Commit 0e1f99e6 authored by Anssi Piirainen's avatar Anssi Piirainen
Browse files

Merge pull request #4 from flowplayer/danielr-core

Danielr core
parents a6cbc4f5 bacdb403
......@@ -5,6 +5,9 @@ Version history:
- Updated to automatically load the latest controls and audio plugins
- #612 add some logging for the stagevideo render state to determine what mode the hardware acceleration is in for various systems.
- #628 opera browsers do not return filesize correctly for latest flash players so require to use load completion instead which may help with gzipped files also.
- #614 when the clip ends if the next clip in the provider has a different provider close the provider stream.
- #627 only detach / attach the display on start events which causes issues in buffering events after a seek in stagevideo.
- #627 re-enable stagevideo state change listeners if stagevideo is available or detach the fullscreen events on first call.
3.2.12
------
......
......@@ -17,11 +17,11 @@ deploy.dir=${site.dir}/content/swf
#plugin.buildfiles=rtmp/build.xml
#
plugin.buildfiles=analytics/build.xml,audio/build.xml,bwcheck/build.xml,bwcheck/build-httpstreaming.xml \
captions/build.xml,content/build.xml,controls/build.xml,controls/build-tube.xml,controls/build-air.xml,controls/build-skinless.xml, \
f4m/build.xml,httpstreaming/build.xml,pseudostreaming/build.xml,rtmp/build.xml,securestreaming/build.xml, \
sharing/build.xml,slowmotion/build.xml,smil/build.xml,viralvideos/build.xml,securedrm/build.xml, \
bitrateselect/build.xml,menu/build.xml,cluster/build.xml
#plugin.buildfiles=analytics/build.xml,audio/build.xml,bwcheck/build.xml,bwcheck/build-httpstreaming.xml \
# captions/build.xml,content/build.xml,controls/build.xml,controls/build-tube.xml,controls/build-air.xml,controls/build-skinless.xml, \
# f4m/build.xml,httpstreaming/build.xml,pseudostreaming/build.xml,rtmp/build.xml,securestreaming/build.xml, \
# sharing/build.xml,slowmotion/build.xml,smil/build.xml,viralvideos/build.xml,securedrm/build.xml, \
# bitrateselect/build.xml,menu/build.xml,cluster/build.xml
#plugin.buildfiles=pseudostreaming/build.xml,controls/build.xml
......@@ -31,11 +31,11 @@ plugin.buildfiles=analytics/build.xml,audio/build.xml,bwcheck/build.xml,bwcheck/
# sharing/build.xml,slowmotion/build.xml,smil/build.xml,viralvideos/build.xml, \
# bitrateselect/build.xml,menu/build.xml,cluster/build.xml
# all plugins
allplugins.buildfiles=analytics/build.xml,audio/build.xml,bwcheck/build.xml,bwcheck/build-httpstreaming.xml \
captions/build.xml,content/build.xml,controls/build.xml,controls/build-tube.xml,controls/build-air.xml,controls/build-skinless.xml, \
f4m/build.xml,httpstreaming/build.xml,pseudostreaming/build.xml,rtmp/build.xml,securestreaming/build.xml, \
sharing/build.xml,slowmotion/build.xml,smil/build.xml,viralvideos/build.xml,securedrm/build.xml, \
bitrateselect/build.xml,menu/build.xml,cluster/build.xml
#allplugins.buildfiles=analytics/build.xml,audio/build.xml,bwcheck/build.xml,bwcheck/build-httpstreaming.xml \
# captions/build.xml,content/build.xml,controls/build.xml,controls/build-tube.xml,controls/build-air.xml,controls/build-skinless.xml, \
# f4m/build.xml,httpstreaming/build.xml,pseudostreaming/build.xml,rtmp/build.xml,securestreaming/build.xml, \
# sharing/build.xml,slowmotion/build.xml,smil/build.xml,viralvideos/build.xml,securedrm/build.xml, \
# bitrateselect/build.xml,menu/build.xml,cluster/build.xml
jsplugins.buildfiles=controls/build.xml,embed/build.xml,ipad/build.xml,playlist/build.xml,bitrateselect/build.xml
......@@ -43,10 +43,10 @@ cloudfront.version=1.0
adsense.version=flowplayer.org-1.6.1
# for plugins that can be built inside the player
plugin-classes=${plugins.dir}/controls/src/actionscript ${plugins.dir}/pseudostreaming/src/actionscript \
${plugins.dir}/rtmp/src/actionscript \
${lib.dir}/common/src/actionscript
plugin-classes=${plugins.dir}/controls/src/actionscript ${lib.dir}/common/src/actionscript
#plugin-classes=${plugins.dir}/controls/src/actionscript ${plugins.dir}/pseudostreaming/src/actionscript \
# ${plugins.dir}/rtmp/src/actionscript \
# ${lib.dir}/common/src/actionscript
plugin-swc=${plugins.dir}/controls/src/flash ${plugins.dir}/pseudostreaming/lib
......
......@@ -138,6 +138,12 @@ package org.flowplayer.controller {
return clip.provider == (_model ? _model.name : (clip.parent ? 'httpInstream' : 'http'));
});
//#614 when the clip ends if the next clip in the provider has a different provider close the provider stream.
clip.onFinish(closeStream, function():Boolean {
return _player.playlist.hasNext() && _player.playlist.nextClip.provider !== _model.name;
});
clip.startDispatched = false;
log.debug("previously started clip " + _startedClip);
if (attempts == 3 && _startedClip && _startedClip == clip && _connection && _netStream) {
......@@ -152,6 +158,17 @@ package org.flowplayer.controller {
}
}
/**
* #614 close the stream and unbind the event.
* @param event
*/
private function closeStream(event:ClipEvent):void
{
netStream.close();
_startedClip = null;
event.target.unbind(closeStream);
}
private function replay(clip:Clip):void {
try {
seek(new ClipEvent(ClipEventType.SEEK, 0), 0);
......
......@@ -102,7 +102,7 @@ import org.flowplayer.model.DisplayPluginModel;
private var _clickTimer:Timer = new Timer(200, 1);
private var _clickEvent:MouseEvent;
//private var _screenMask:Sprite;
private var _screenMask:Sprite;
[Frame(factoryClass="org.flowplayer.view.Preloader")]
public function Launcher() {
......@@ -230,8 +230,8 @@ import org.flowplayer.model.DisplayPluginModel;
log.debug("starting configured streams");
startStreams();
//#508 disabling the stagevideo screen mask, canvas is visible without it.
//createScreenMask();
//#627 re-enabling screen mask for stage video.
createScreenMask();
arrangeScreen();
addListeners();
......@@ -252,7 +252,7 @@ import org.flowplayer.model.DisplayPluginModel;
}
//#508 disabling the stagevideo screen mask, canvas is visible without it.
/*private function createScreenMask():void {
private function createScreenMask():void {
blendMode = BlendMode.LAYER;
_screenMask = new Sprite();
......@@ -264,7 +264,7 @@ import org.flowplayer.model.DisplayPluginModel;
_screenMask.y = 0;
_screenMask.width = 100;
_screenMask.height = 100;
} */
}
private function resizeCanvasLogo():void {
_canvasLogo.alpha = 1;
......@@ -739,9 +739,13 @@ import org.flowplayer.model.DisplayPluginModel;
graphics.endFill();
//#508 disabling the stagevideo screen mask, canvas is visible without it.
/*CONFIG::FLASH_10_1 {
CONFIG::FLASH_10_1 {
_flowplayer.playlist.onStageVideoStateChange(onStageVideoStateChange);
} */
//#627 re-enable stagevideo state change listeners if stagevideo is available or detach the fullscreen events on first call.
_flowplayer.onFullscreen(onStageVideoFullscreen);
_flowplayer.onFullscreenExit(onStageVideoFullscreen);
}
}
private function onMouseOut(event:MouseEvent):void {
......@@ -753,35 +757,52 @@ import org.flowplayer.model.DisplayPluginModel;
}
//#508 disabling the stagevideo screen mask, canvas is visible without it.
/*CONFIG::FLASH_10_1 {
private function onStageVideoStateChange(event:ClipEvent):void {
var stageVideo:StageVideo = event.info as StageVideo;
log.info("stage video state changed " + stageVideo);
if ( stageVideo ) {
_screenMask.width = stageVideo.viewPort.width;
_screenMask.height = stageVideo.viewPort.height;
_screenMask.x = stageVideo.viewPort.x;
_screenMask.y = stageVideo.viewPort.y;
log.debug("mask dimensions " + _screenMask.width + " x " + _screenMask.height);
log.debug("mask pos " + _screenMask.x + ", " + _screenMask.y);
if ( ! contains(_screenMask) ) {
//#508 stage video mask was being added to the top layer and hiding all children.
addChildAt(_screenMask, 1);
//addChildAt(_screenMask, _canvasLogo ? getChildIndex(_canvasLogo) + 1 : 1);
log.debug("adding mask");
}
} else {
if ( contains(_screenMask) ) {
log.debug("removing mask")
removeChild(_screenMask);
}
}
}
} */
CONFIG::FLASH_10_1 {
private function onStageVideoStateChange(event:ClipEvent):void {
var stageVideo:StageVideo = event.info as StageVideo;
log.info("stage video state changed " + stageVideo);
if ( stageVideo ) {
_screenMask.width = stageVideo.viewPort.width;
_screenMask.height = stageVideo.viewPort.height;
_screenMask.x = stageVideo.viewPort.x;
_screenMask.y = stageVideo.viewPort.y;
log.debug("mask dimensions " + _screenMask.width + " x " + _screenMask.height);
log.debug("mask pos " + _screenMask.x + ", " + _screenMask.y);
if ( ! contains(_screenMask) ) {
//#508 stage video mask was being added to the top layer and hiding all children.
addChildAt(_screenMask, 0);
//addChildAt(_screenMask, _canvasLogo ? getChildIndex(_canvasLogo) + 1 : 1);
log.debug("adding mask");
}
//#627 unbind the stagevideo state change events after the screen mask is setup.
_flowplayer.playlist.unbind(onStageVideoStateChange);
} else {
if ( contains(_screenMask) ) {
log.debug("removing mask")
removeChild(_screenMask);
_flowplayer.playlist.unbind(onStageVideoStateChange);
}
}
}
/**
* #627 re-enable stagevideo state change listeners if stagevideo is available or detach the fullscreen events on first call.
* @param event
*/
private function onStageVideoFullscreen(event:PlayerEvent):void
{
//#627 if stage video is not configured or available unbind the fullscreen events on first try.
if (!_flowplayer.playlist.current.useStageVideo) {
_flowplayer.unbind(onStageVideoFullscreen);
}
_flowplayer.playlist.onStageVideoStateChange(onStageVideoStateChange);
}
}
private function createPanel():void {
_panel = new Panel();
......
......@@ -271,7 +271,9 @@ package org.flowplayer.view {
private function addListeners(eventSupport:ClipEventSupport):void {
eventSupport.onPlaylistReplace(onPlaylistChanged);
eventSupport.onClipAdd(onClipAdded);
eventSupport.onBufferFull(onBufferFull);
//eventSupport.onBufferFull(onBufferFull);
//#627 only detach / attach the display on start events which causes issues in buffering events after a seek in stagevideo.
eventSupport.onStart(onBufferFull);
eventSupport.onBegin(onBegin);
eventSupport.onStart(onStart);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment