How do I specify a crossdomain policy file to allow Flash to grab a bitmap from an RTMP (Wowza) video stream?

馋奶兔 提交于 2019-12-01 23:30:31

It's not a crossdomain.xml issue: Here's the relevant Adobe documentation. I think this post may also be of help.

I am using Wowza too, I had the same problem than you, here what I did:

  1. Changed Application.xml configuration, added * for client > Access > ...

  2. Load a crossDomain.xml file, here the piece of code I use to load http or streaming files:

                var url:String = this.vVideos.selectedItem.url;
                var protocol:String = URLUtil.getProtocol(url).toLowerCase();
                var crossDomainXmlUrl:String;
    
                if (protocol == 'rtmp' || protocol == 'rtmpt')
                {
                    crossDomainXmlUrl = 'http://' + URLUtil.getServerName(url) + ':1935/crossdomain.xml';
                }
                else
                {
                    crossDomainXmlUrl = 'http://' + URLUtil.getServerName(url) + '/crossdomain.xml';
                }
    
                Security.loadPolicyFile(crossDomainXmlUrl);
    
                this.videoMedia.source = url;
                this.videoMedia.visible = true;
    
                setTimeout(this.play,1000);
    

eBuildy, Adobe Flex specialists

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!