Skip to content

Instantly share code, notes, and snippets.

@universax
Created June 16, 2019 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save universax/eacf832a2dc102abcbc1742d43e48b85 to your computer and use it in GitHub Desktop.
Save universax/eacf832a2dc102abcbc1742d43e48b85 to your computer and use it in GitHub Desktop.
MobileVLCFrameworkのシンプルなテストコード
//
// ViewController.m
// VLC_Test
//
// Created by YOHEI KAJIWARA on 2019/06/15.
// Copyright © 2019 YOHEI KAJIWARA. All rights reserved.
//
#import "ViewController.h"
#import "MobileVLCKit/MobileVLCKit.h"
@interface ViewController ()
@property (strong, nonatomic) IBOutlet UIView *videoView; // This videoView is the main view in the .xib file
@property VLCMediaPlayer *mediaPlayer;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
_mediaPlayer = [[VLCMediaPlayer alloc] init];
_mediaPlayer.drawable = _videoView;
_mediaPlayer.media = [VLCMedia mediaWithURL:[NSURL URLWithString:@"https://manifest.googlevideo.com/api/manifest/hls_playlist/expire/1560617760/ei/wM4EXcLFK4_s4wLzhZrwDg/ip/2400:2200:242:7abd:8ae:c89e:9088:63d/id/lrX6ktLg8WQ.2/itag/96/source/yt_live_broadcast/requiressl/yes/ratebypass/yes/live/1/goi/160/sgoap/gir%3Dyes%3Bitag%3D140/sgovp/gir%3Dyes%3Bitag%3D137/hls_chunk_host/r3---sn-ogueln7s.googlevideo.com/gcr/jp/playlist_type/DVR/initcwndbps/5220/mm/44/mn/sn-ogueln7s/ms/lva/mv/m/pl/20/dover/11/keepalive/yes/mt/1560596067/disable_polymer/true/sparams/expire,ei,ip,id,itag,source,requiressl,ratebypass,live,goi,sgoap,sgovp,gcr,playlist_type/sig/ALgxI2wwRgIhAOiFCKA8YKjK_ipbKWQ6W9fDg14rbCoJo1aQeyKK6tQiAiEAk2T9Qrr0AD_0EOanlcw_ee440JmnDIGfa7QFFmuJ7tw%3D/lsparams/hls_chunk_host,initcwndbps,mm,mn,ms,mv,pl/lsig/AHylml4wRgIhAND5rXApRo3imDnxQftT3BMrv4zcH6TJ5i2dR7NVTbYDAiEA5O1Pnm-pq8bb2W-1icxvupvPDDfFY1rLj0fgtvmi8oI%3D/playlist/index.m3u8"]];
[_mediaPlayer play];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment