Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在请求服务器接口后,不能连接到视频,一直显示b不是function,怎么解决 #51

Open
WEBSFAN opened this issue May 11, 2017 · 0 comments

Comments

@WEBSFAN
Copy link

WEBSFAN commented May 11, 2017

$.ajax({
type: 'GET',
url: '',
data: {
room_id: roomid
},
dataType: 'jsonp',
timeout: 300,
success: function (data) {

                  //直播开始
                if (data.status === "LIVING") {
                    var livingPage = '<div class="personmsg"><span class="headportrait"><img src="' + anchor_headpic + '" alt=""></span>'
                        + '<p><span>' + data.anchor_name + '</span>'
                        + '<span class="viewers">' + data.member_num + '</span></p><a href="#"></a></div>'
                        + '<div class="mainarea"><div id="player" style="width: 100%;height: 100%;"></div></div>';

                    var script = document.createElement('script');
                    script.type = 'text/javascript';
                    script.src = '../player/sewise.player.min.js?server=vod&type=m3u8&videourl=http://qq.m3u8&autostart=true&starttime=0&lang=zh_CN&logo=http://onvod.sewise.com/libs/swfplayer/skin/images/logo.png&title=M3U8 Cross Platform&buffer=5&claritybutton=disable&skin=vodFlowPlayer;

                    $("#open").append(livingPage);
                    $("#player").append(script);
                }
             },
            error: function (xhr, type) {
                alert('Ajax error!')
            }
        })
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant