jackzhang1204/sewise-player

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

WEBSFAN opened this issue · 0 comments

$.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!')
            }
        })