Created
August 9, 2014 15:35
-
-
Save jin1016/23ace65d1d8ca2f45506 to your computer and use it in GitHub Desktop.
吉里吉里Z Media Foundation モードサンプル
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class H264Window extends Window { | |
var base; | |
var video; | |
function H264Window( width, height ) { | |
super.Window(); | |
setSize( width, height ); | |
setInnerSize( width, height ); | |
base = new Layer(this, null); | |
base.setSize(width,height); | |
base.setSizeToImageSize(); | |
base.name = "base"; | |
base.visible = true; | |
add(base); | |
add(video = new VideoOverlay(this)); | |
video.onStatusChanged = onStatusChanged; | |
video.mode = vomMFEVR; | |
video.open("test.mp4"); | |
if( video.mode != vomMFEVR ) { | |
video.setPos( 0, 0 ); | |
setInnerSize(video.originalWidth, video.originalHeight); | |
video.setSize(video.originalWidth, video.originalHeight); | |
video.play(); | |
video.visible = true; | |
} | |
} | |
function onStatusChanged(status) { | |
Debug.message(status); | |
if( status == "ready" ) { | |
video.setPos( 0, 0 ); | |
setInnerSize(video.originalWidth, video.originalHeight); | |
video.setSize(video.originalWidth, video.originalHeight); | |
video.play(); | |
video.visible = true; | |
} | |
} | |
} | |
var videowindow = new H264Window(1280,720); | |
videowindow.visible = true; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment