The Help Docs for OSMF 1.6 and stage video clearly state that stage video will only operate when WMODE=Direct or the application is running in full screen.
But I'm finding that if I'm using Chrome and Safari on my Mac, and IE9 on the PC, stage video kicks in even when WMODE=Transparent.
I actually don't want to use stage video when I'm not in full screen, as I want the video to appear on top of flash content.
So if you are using Firefox in the browser you see the video ontop of my other graphical elements, but if you are using IE9 then the video dissapears behind the other content.
Since OSMF handles the stage video switching automaticly its causing allot of issues for crossbrowser testing.
I tried disabling stageVideo by OSMFSettings.enableStageVideo = false; but this also forces full screen to be software rendered so I end up losing the benifits of hardware acceliration even when if full screen.
Any ideas why some browsers would enable stage video and others would not?
And is there a way to control when stage video kicks in without having to dissable it compleatly?
Thanks in advance.
Thanks Silviu for your quick reply.
I'm not sure I could post my source code as it is part of a very lengthy application already in production.
But her are a few details that may be helpful
I use the Akamai advanced streaming plug-in with live HTTP streaming.
But I'm letting OSMF do all of the Stage Video Processing.
Flash Player 11.3.300.265
Compiling against Flash 10.3 in Flash Professional CS5
OSMF 1.6
AkamaiAdvancedStreamingPlugin ver 2.7
OS MAC OSX 10.6.8.
Safari 5.1.5
Chrome 20.0.1132.57
I will set up a simpler example on one of our QA servers and post the embed code.
Thanks again.
I have set up a simple test demenstrating the issue.
http://qa-www.nbclearn.com/as3/componentsAOD2/OSMF_Simple_test.html
On this page the Wmode is set to transparent. On the Mac If you view the page in Firefox, the video is above the test object. If you view the page in Google Chrome or Safari on the Mac
The test object is above the video window. IE9 on the PC also shows the stage video active below the test object.
i've inlcuded a trace statment showing weather stage video is avilable or not.
Please see my source code below for this example.
Thank you.
package
{
import flash.display.MovieClip;
import flash.net.URLLoader;
import org.osmf.media.MediaElement;
import org.osmf.media.MediaPlayerSprite;
import org.osmf.media.MediaPlayer;
import org.osmf.media.DefaultMediaFactory;
import org.osmf.display.ScaleMode;
import org.osmf.media.URLResource;
import org.osmf.events.MediaFactoryEvent;
import com.akamai.stagevideo.StageVideoHelper;
import flash.events.StageVideoAvailabilityEvent;
import flash.geom.Rectangle;
import flash.events.Event;
import flash.net.URLRequest;
/**
* ...
* @author Ari Oshinsky
*/
public class OSMF_Simple_test extends MovieClip
{
private static const AKAMAI_PLUGIN:String = "AkamaiAdvancedStreamingPlugin2.7_osmf1.6.swf";
private var videoPlayerOSMF:MediaPlayer;
var mediaFactory:DefaultMediaFactory;
var video_helper:StageVideoHelper;
var mediaPlayerSprite:MediaPlayerSprite
public function OSMF_Simple_test() {
mediaPlayerSprite = new MediaPlayerSprite();
mediaPlayerSprite.x = 5;
mediaPlayerSprite.y = 5;
mediaPlayerSprite.width = 640;
mediaPlayerSprite.height = 480;
this.addChild(mediaPlayerSprite);
mediaPlayerSprite.scaleMode = ScaleMode.LETTERBOX;
// videoPlayerOSMF = mediaPlayerSprite.media;
mediaFactory = new DefaultMediaFactory()
mediaFactory.addEventListener(MediaFactoryEvent.PLUGIN _LOAD, onPluginLoad)
var resource:URLResource = new URLResource(AKAMAI_PLUGIN);
mediaFactory.loadPlugin(resource);
}
private function onPluginLoad(e:MediaFactoryEvent){
trace("~Akamai plugin loaded successfully.");
video_helper = new StageVideoHelper(this.stage, new Rectangle(mediaPlayerSprite.x, mediaPlayerSprite.y, mediaPlayerSprite.width, mediaPlayerSprite.height));
this.stage.addEventListener(StageVideoAvailabilityEven t.STAGE_VIDEO_AVAILABILITY , checkStageVideoAvilability);
var akamaiLoader:URLLoader = new URLLoader();
akamaiLoader.addEventListener(Event.COMPLETE, loadVideoStream);
akamaiLoader.load(new URLRequest(AKAMAI_SMIL_F4M));
}
private function loadVideoStream(event:Event) {
var loader:URLLoader = URLLoader(event.target);
var akamaiMediaResource:URLResource = new URLResource(loader.data)// the loader returns the phyisical location of the smil file.
var mediaElement:MediaElement = mediaFactory.createMediaElement(akamaiMediaResource);
mediaPlayerSprite.media = mediaElement; // set the media element as the new media to load, it should automaticly trigger a play command.
}
private function checkStageVideoAvilability(event:StageVideoAvailabilityEvent) {
object_mc.trace_txt.text = "Stage Video Available: " + event.availability;
}
}
}
North America
Europe, Middle East and Africa
Asia Pacific