开发者

I DO want Flash to autoplay!

开发者 https://www.devze.com 2023-01-29 11:50 出处:网络
I\'ve got an issue that I\'m not sure is workable, but here goes - I\'m using swfObject to embed some Flash video on a page, and am passing it a previously built player I was hoping to use. Everythin

I've got an issue that I'm not sure is workable, but here goes - I'm using swfObject to embed some Flash video on a page, and am passing it a previously built player I was hoping to use. Everything works fine, but I'd like the .swf to autoplay (it's loaded in a jQuery lightbox).开发者_开发技巧 I'm beginning to think I can't force it without altering the original .fla file, which I don't have. So, if it's possible, let me know and I will forever be indebted. Code:

        $(document).ready(function () {

                var params = {
                    allowFullScreen: "true"
                };

                var flashvars = {
                    video: "...voices_final.mov",
                    maintainAspectRatio: "false"
                };

                var attributes = {};
                swfobject.embedSWF("...videoPlayer.swf", "voices-flash", "720", "405", "9.0.0", "expressInstall.swf", flashvars, params, attributes);
            }
        });


It all depends on the programmed features and behaviors of the SWF. For example, FlowPlayer has a special flashvar for instructing the player to autoplay a video.

Your SWF will need to have ability.


You could decompile the SWF and see if there's a public function that starts the video. Then you can create an app that loads the SWF and executes the public function. Or maybe even easier, you could try adjusting the code in the decompiled SWF so it autostarts and try to recompile it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号