The Flash video player which supports all iOS video player features.
The StrobeMediaPlayback video player is used in http://2gzr.com video app and maintained by the DENIVIP team. The main reason for this repository is to store the ready to use StrobeMediaPlayback with all plugins enabled, configured and optimized. Previously you would need hours to make everything work and sometimes you would have to go deep into the sources to integrate some plugins. That's over now.
This StrobeMediaPlayback configuration features:
In simplest case all you need is just
<script type="text/javascript" src="https://github.com/denivip/StrobeMediaPlayback/raw/master/lib/swfobject.js"></script>
<!-- your page code here -->
<div id="strobeplayer"></div>
<!-- another page code -->
<script>
var parameters = {
src: "http://el-18.am.2gzr.com/53f775b91b8204531a90b95f.m3u8"
};
// Embed the player SWF:
swfobject.embedSWF(
"StrobeMediaPlayback.swf" // swf
, "strobeplayer" // your player place
// player size
, 640
, 360
, "10.1.0"
, "expressInstall.swf"
, parameters
, {
allowFullScreen: "true",
wmode: "direct"
}
, {
name: "StrobeMediaPlayback"
}
);
Configuration
------------
You can see default params here:
* Basic options: http://help.adobe.com/en_US/FMPSMP/Dev/WS3fd35e178bb08cb3-49a02f129f1468bd6-7fff.html
* Advanced options: http://help.adobe.com/en_US/FMPSMP/Dev/WS3fd35e178bb08cb3-49a02f129f1468bd6-7ff9.html
* Bandwidth options: http://help.adobe.com/en_US/FMPSMP/Dev/WS3fd35e178bb08cb3-49a02f129f1468bd6-7ffa.html
JavaScript API
------------
You need get current player instance:
- add JSBridgeHandler function to flashvars:
var parameters = { src: "https://hls.spuul.com/debug/unprotected/apl-noaes/master.m3u8", ... // other parameters javascriptCallbackFunction: "onJavaScriptBridgeCreated" }
- declare this function
var player = null; function onJavaScriptBridgeCreated(id){ if(player == null){ player = document.getElementById(id); // other actions } }
API
You can use all methods/properties of MediaPlayer class as well as in AS3:
player.play();
But for properties you need add get/set prefix:
player.setSrc('
Also most of all playback events available in JS:
player.addEventListener('mediaPlayerStateChange', onMediaPlayerStateChange); function onMediaPlayerStateChange(state){ switch(state){ case 'emptied': // ready //... break; case 'loadstart': // loading //... break; case 'play': // playing //... break; case 'pause': // paused //... break; case 'waiting': // buffering //... break; } }
player.addEventListener('seekingChange', onSeeking); function onSeeking(state){ if(state == 'seeking'){ // you can enable loading animation as example loader.show(); } if(state == 'seeked'){ loader.hide(); // you can move external seekbar to actual player position seekBar.progress = player.getCurrentTime(); } }
Full list of available methods/events you can find in the JSAPI.md doc.
VAST Ads
------------
TODO
GTrack Plugin
---------------
You can add Google Analytics support in Strobe Media Playback.
* Just add this config lines before player params (and change params 'account' and 'url' to yours actual values):
var gTrack = '