//HTML5 视频
import web.blink.form;
import web.npPlugin.flash;
import wsock.tcp.asynHttpServer;
import win.ui;
/*DSG{{*/
var winform = win.form(text="web.blink 支持 HTML5 视频（基于 Flash）";right=1008;bottom=616)
winform.add()
/*}}*/

var httpServer = wsock.tcp.asynHttpServer(); 
httpServer.run( {
	["/index.html"] = /**
<html>
<head>
	<style type="text/css">
		html,body { height:100%;width:100%;margin:0;overflow:hidden; }
	</style>
	
	<!--第一步：引入下面3个文件加载播放器 --> 
	<link href="https://cdn.jsdelivr.net/gh/aardio/video-js-blink/video-js.min.css" rel="stylesheet">
	<script src="https://cdn.jsdelivr.net/gh/aardio/video-js-blink/video.min.js"></script> 
	<script src="https://cdn.jsdelivr.net/npm/videojs-flash@2.2.1/dist/videojs-flash.min.js"></script> 
</head>
<body>

	<!-- 第二步：插入视频文件 -->
	<video id="my-player" class="video-js" controls preload="auto" style="width:100%;height:100%"  >
		<source src="http://download.aardio.com/demo/video.aardio" type="video/mp4"></source>
	</video>

	<script>
			
		//第三步：初始化播放器,这一步不能省略
		var obj = videojs("my-player", { 
			controlBar: {
				fullscreenToggle: true
			}
		}); 
		
	</script>
</body>
</html>
**/;
}); 

var wb = web.blink.form( winform );
wb.go( httpServer.getUrl("index.html") );

winform.show(); 
win.loopMessage();