播放flv文件

xiaoxiao2025-02-13  15

<html> <head> <script type="text/javascript" src="[color=orange]swfobject.js[/color]"></script> </head> <body> <h3>single file, with preview image:</h3> <p id="player1"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p> <script type="text/javascript"> var s1 = new SWFObject("[color=orange]flvplayer.swf[/color]","single","300","170","7"); s1.addParam("allowfullscreen","true"); s1.addVariable("file","video.flv"); s1.addVariable("image","preview.jpg"); s1.addVariable("width","300"); s1.addVariable("height","170"); s1.write("player1"); </script> <h3>playlist file, with different colors:</h3> <p id="player2"><a href="http://www.macromedia.com/go/getflashplayer">Get the Flash Player</a> to see this player.</p> <script type="text/javascript"> var s2 = new SWFObject("flvplayer.swf","playlist","300","312","7"); s2.addParam("allowfullscreen","true"); s2.addVariable("file","playlist.xml"); s2.addVariable("displayheight","200"); s2.addVariable("backcolor","0x000000"); s2.addVariable("frontcolor","0xCCCCCC"); s2.addVariable("lightcolor","0x557722"); s2.addVariable("width","300"); s2.addVariable("height","312"); s2.write("player2"); </script> <p><a href="http://www.jeroenwijering.com/extras/wizard.html">online configuration wizard</a></p> </body> </html> 播放的前提是: 1、安装adobe的flash player 2、有flvplayer.swf文件 3、导入swfobject.js 可以解决flash在ie浏览器中需要激活控件的问题,更重要的不会因为flvplayer播放的文件文件名为空时宕机. 相关资源:网页播放FLV格式视频JAVA源码
转载请注明原文地址: https://www.6miu.com/read-5024639.html

最新回复(0)