通过网址播放youtube和facebook视频

时间:2018-04-20 10:29:10

标签: php html codeigniter

如何在html网站上通过网址播放YouTube和Facebook视频。我将建立一个活动网站,客户将从YouTube或他们的Facebook复制视频网址。    这是html代码:

Youtube Videos: <input name="vlinkop" type="radio" value="utube">

Facebook Video: <input name="vlinkop" type="radio" value="fvideo">

<input autofocus="true" class="form-control" type="url" name="txturl">
<input type="submit" name="btnsave" class="btn btn-info" value="Save" />    

此处视频将显示在页面加载上:

      <?php
     if(!empty($result)){
       foreach($result as $video){
       ?>
       <div class="col-md-3 col-xs-12">
         <iframe src="<?php echo $video->videourl;  ?>"></iframe>
       </div>
      <?php } } >

1 个答案:

答案 0 :(得分:2)

看看:

[嵌入式视频&amp;直播视频播放器]

https://developers.facebook.com/docs/plugins/embedded-video-player

的Youtube:

protected override void OnCreate(Bundle bundle) {
    base.OnCreate(bundle);

    BookOfLife.Helpers.Constants.WIDTHOFSCREEN = Resources.DisplayMetrics.WidthPixels;
    BookOfLife.Helpers.Constants.HEIGHTOFSCREEN = Resources.DisplayMetrics.HeightPixels;

    this.Window.AddFlags(WindowManagerFlags.Fullscreen);

    SetContentView(Resource.Layout.Activity_ReadAsset);

    if (this.Application.IsInDebugMode) {
        BackroundThreadding();
    } else {
        StartAnimtions();
    }

}

将YOUR-YOUTUBE_VIDEO_CODE替换为视频代码

相关问题