一、Youtube Player
demo链接:
https://developers.google.com/youtube/youtube_player_demo
利用JavaScript Iframe 来使用Youtube播放器
The IFrame player API lets you embed a YouTube video player on your website and control the player using JavaScript.
Using the API's JavaScript functions, you can queue videos for playback; play, pause, or stop those videos; adjust the player volume; or retrieve information about the video being played. You can also add event listeners that will execute in response to certain player events, such as a player state change.
This guide explains how to use the IFrame API. It identifies the different types of events that the API can send and explains how to write event listeners to respond to those events. It also details the different JavaScript functions that you can call to control the video player as well as the player parameters you can use to further customize the player.
二、Eyepetizer
使用了Native Player,逆向分析UI层次如下:

Native Player使用了阿里云播放sdk

播放控制器-RichVidePlayerViewController

三、VideoTube
使用了UIWebview,基于Youtube IFrame Player API 由JavaScript来实现

网友评论