Example #1
0
def getTvPatrolReplayMenu(userAgent = userAgent):
    from lib.brightcove import BrightCove
    serviceKey = 'f7d4096475cca62e0afb88633662b4df1f429b98'
    playerKey = 'AQ~~,AAABtXvbPVE~,ZfNKKkFP3R8lv_FZU4AZv5yZg6d3YSFW'
    playerId = 1933244636001
    brightCove = BrightCove(serviceKey, playerKey, serviceUrl = brightCoveserviceUrl, serviceName = brightCoveServiceName)
    brightCoveResponse = brightCove.getBrightCoveData(playerId, userAgent)
    videoData = brightCoveResponse['playlistTabs']['lineupListDTO']['playlistDTOs'][0]['videoDTOs']
    return getOndemandMenu(videoData, r'/ondemand/&(mp4:.+\.mp4)\?')
Example #2
0
def getTvPatrolLiveMenu(userAgent = userAgent):
    from lib.brightcove import BrightCove
    serviceKey = 'aa3634a3b4371a1c2f780f830dc2fd1ef4bbb111'
    playerKey = 'AQ~~,AAABtXvbPVE~,ZfNKKkFP3R-R8qlcWfs20DL-8Bvb6UcW'
    playerId = 1905932797001
    brightCove = BrightCove(serviceKey, playerKey, serviceUrl = brightCoveserviceUrl, serviceName = brightCoveServiceName)
    brightCoveResponse = brightCove.getBrightCoveData(playerId, userAgent)
    videoData = brightCoveResponse['playlistCombo']['lineupListDTO']['playlistDTOs'][0]['videoDTOs']
    return getLiveMenu(videoData, r'/live/&(LS_TVPatrol.+)')
Example #3
0
def getBandilaReplayMenu(userAgent = userAgent):
    from lib.brightcove import BrightCove
    serviceKey = '1e901d1b97bc4590fa2d3924a8ec642d684afca4'
    playerKey = 'AQ~~,AAABtXvbPVE~,ZfNKKkFP3R_F56e3g2DVHn4JP7JQvZsz'
    playerId = 1927018689001
    brightCove = BrightCove(serviceKey, playerKey, serviceUrl = brightCoveserviceUrl, serviceName = brightCoveServiceName)
    brightCoveResponse = brightCove.getBrightCoveData(playerId, userAgent)
    videoData = brightCoveResponse['videoList']['mediaCollectionDTO']['videoDTOs']
    return getOndemandMenu(videoData, r'/ondemand/&(mp4:.+\.mp4)\?')
Example #4
0
def getTvPatrolReplayMenu(userAgent=userAgent):
    from lib.brightcove import BrightCove
    serviceKey = 'f7d4096475cca62e0afb88633662b4df1f429b98'
    playerKey = 'AQ~~,AAABtXvbPVE~,ZfNKKkFP3R8lv_FZU4AZv5yZg6d3YSFW'
    playerId = 1933244636001
    brightCove = BrightCove(serviceKey,
                            playerKey,
                            serviceUrl=brightCoveserviceUrl,
                            serviceName=brightCoveServiceName)
    brightCoveResponse = brightCove.getBrightCoveData(playerId, userAgent)
    videoData = brightCoveResponse['playlistTabs']['lineupListDTO'][
        'playlistDTOs'][0]['videoDTOs']
    return getOndemandMenu(videoData, r'/ondemand/&(mp4:.+\.mp4)\?')
Example #5
0
def getTvPatrolLiveMenu(userAgent=userAgent):
    from lib.brightcove import BrightCove
    serviceKey = 'aa3634a3b4371a1c2f780f830dc2fd1ef4bbb111'
    playerKey = 'AQ~~,AAABtXvbPVE~,ZfNKKkFP3R-R8qlcWfs20DL-8Bvb6UcW'
    playerId = 1905932797001
    brightCove = BrightCove(serviceKey,
                            playerKey,
                            serviceUrl=brightCoveserviceUrl,
                            serviceName=brightCoveServiceName)
    brightCoveResponse = brightCove.getBrightCoveData(playerId, userAgent)
    videoData = brightCoveResponse['playlistCombo']['lineupListDTO'][
        'playlistDTOs'][0]['videoDTOs']
    return getLiveMenu(videoData, r'/live/&(LS_TVPatrol.+)')
Example #6
0
def getBandilaReplayMenu(userAgent=userAgent):
    from lib.brightcove import BrightCove
    serviceKey = '1e901d1b97bc4590fa2d3924a8ec642d684afca4'
    playerKey = 'AQ~~,AAABtXvbPVE~,ZfNKKkFP3R_F56e3g2DVHn4JP7JQvZsz'
    playerId = 1927018689001
    brightCove = BrightCove(serviceKey,
                            playerKey,
                            serviceUrl=brightCoveserviceUrl,
                            serviceName=brightCoveServiceName)
    brightCoveResponse = brightCove.getBrightCoveData(playerId, userAgent)
    videoData = brightCoveResponse['videoList']['mediaCollectionDTO'][
        'videoDTOs']
    return getOndemandMenu(videoData, r'/ondemand/&(mp4:.+\.mp4)\?')
Example #7
0
def play(id, userAgent):
    import CommonFunctions, urlparse, xbmcgui, re
    common = CommonFunctions
    common.plugin = xbmcaddon.Addon().getAddonInfo('name')
    htmlData = None
    flashVars = None
    vars = None
    try:
        htmlData = openUrl('/livestream.html')
        flashVars = common.parseDOM(
            htmlData,
            "embed",
            attrs={'base': 'http://admin.brightcove.com'},
            ret='flashVars')
        vars = urlparse.parse_qs(flashVars[0])
    except:
        pass
    from lib.brightcove import BrightCove
    playerKey = ''
    playerId = 0
    videoPlayer = 0
    if vars:
        playerKey = vars['playerKey'][0]
        playerId = int(vars['playerID'][0])
        videoPlayer = int(vars['@videoPlayer'][0])
    else:
        # I hope these are fixed values.
        playerKey = 'AQ~~,AAABtXvbPVE~,ZfNKKkFP3R-Khxw89mTKD3dSRwdPk_kt'
        playerId = 2023948803001
        videoPlayer = 2147444863001
    brightCoveServiceName = 'com.brightcove.player.runtime.PlayerMediaFacade'
    brightCoveserviceUrl = 'http://c.brightcove.com/services/messagebroker/amf'
    brightCove = BrightCove('1f101e877a92705f79de79e69685bd57f931cede',
                            playerKey,
                            serviceUrl=brightCoveserviceUrl,
                            serviceName=brightCoveServiceName)
    publisherId = 1878978674001
    brightCoveResponse = brightCove.findMediaById(playerId, videoPlayer,
                                                  publisherId, userAgent)
    pattern = re.compile(r'/live/&(.+)')
    m = pattern.search(brightCoveResponse['FLVFullLengthURL'])
    playPath = m.group(1)
    liz = xbmcgui.ListItem(brightCoveResponse['shortDescription'],
                           iconImage="DefaultVideo.png")
    liz.setInfo(type="Video",
                infoLabels={"Title": brightCoveResponse['shortDescription']})
    videoUrl = brightCoveResponse[
        'FLVFullLengthURL'] + ' live=1 app=live playPath=' + playPath
    xbmc.Player().play(videoUrl, liz)
Example #8
0
def play(id, userAgent):
    import CommonFunctions, urlparse, xbmcgui, re
    common = CommonFunctions
    common.plugin = xbmcaddon.Addon().getAddonInfo('name')
    htmlData = None
    flashVars = None
    vars = None
    try:
        htmlData = openUrl('/livestream.html')
        flashVars = common.parseDOM(htmlData, "embed", attrs = {'base' : 'http://admin.brightcove.com'}, ret = 'flashVars')
        vars = urlparse.parse_qs(flashVars[0])
    except:
        pass
    from lib.brightcove import BrightCove
    playerKey = ''
    playerId = 0
    videoPlayer = 0
    if vars:
        playerKey = vars['playerKey'][0]
        playerId = int(vars['playerID'][0])
        videoPlayer = int(vars['@videoPlayer'][0])
    else:
        # I hope these are fixed values.
        playerKey = 'AQ~~,AAABtXvbPVE~,ZfNKKkFP3R-Khxw89mTKD3dSRwdPk_kt'
        playerId = 2023948803001
        videoPlayer = 2147444863001
    brightCoveServiceName = 'com.brightcove.player.runtime.PlayerMediaFacade'
    brightCoveserviceUrl = 'http://c.brightcove.com/services/messagebroker/amf'
    brightCove = BrightCove('1f101e877a92705f79de79e69685bd57f931cede', playerKey, serviceUrl = brightCoveserviceUrl, serviceName = brightCoveServiceName)
    publisherId = 1878978674001
    brightCoveResponse = brightCove.findMediaById(playerId, videoPlayer, publisherId, userAgent)
    pattern = re.compile(r'/live/&(.+)')
    m = pattern.search(brightCoveResponse['FLVFullLengthURL'])
    playPath = m.group(1)
    liz=xbmcgui.ListItem(brightCoveResponse['shortDescription'], iconImage = "DefaultVideo.png")
    liz.setInfo( type="Video", infoLabels = { "Title": brightCoveResponse['shortDescription'] } )
    videoUrl = brightCoveResponse['FLVFullLengthURL'] + ' live=1 app=live playPath=' + playPath
    xbmc.Player().play(videoUrl, liz)