Quantcast
Channel: Kaltura - Latest posts
Viewing all articles
Browse latest Browse all 7410

Custom url for video

$
0
0

Yep you are right, this is not the example you shared. I was actually trying a few options.
So I gave a try to the example you suggested too. However the player refuses to even load :(.
Here's my code:

<html>
<head>
    <title></title>
    <script src="http://cdnapisec.kaltura.com/p/2027961/sp/202796100/embedIframeJs/uiconf_id/32020091/partner_id/2027961"></script>
    <!--<script src="/kWidget/kWidget.js"></script>-->
    <!--<script src="mwEmbedLoader.php"></script>-->
    <!--<script src="load.php"></script>-->
<div id="kaltura_player_1446547025" style="width:430px;height:330px;" itemprop="video" itemscope itemtype="http://schema.org/VideoObject" >
    <!-- Search engine metadata, based on schema.org/VideoObject -->
    <span itemprop="description" content="test folgers coffe"></span>
    <span itemprop="name" content="FolgersCoffee_mpeg"></span>
    <span itemprop="duration" content="60"></span>
    <span itemprop="thumbnailUrl" content="http://cfvod.kaltura.com/p/2027961/sp/202796100/thumbnail/entry_id/1_3gmgqn2e/version/100007/acv/171"></span>
    <span itemprop="width" content="430"></span>
    <span itemprop="height" content="330"></span>
</div>
<!--<script>-->
    <!--kWidget.embed({-->
        <!--targetId: "kaltura_player_1446547025",-->
        <!--wid: "_2027961",-->
        <!--uiconf_id: "32020091",-->
        <!--cache_st: "1446547025",-->
        <!--entry_id: "1_3gmgqn2e"-->
    <!--});-->
<!--</script>-->
<body>
<script>

    var jsonConfig	= {
        "plugins":{
            "topBarContainer": {},
            "titleLabel": {},
            "controlBarContainer": {
                "hover": true
            },
            "largePlayBtn": {},
            "scrubber": {
                'thumbSlicesUrl': '{mediaProxy.entryMetadata.thumbSlicesUrl}'
            },
            "playPauseBtn": {},
            "volumeControl": {},
            "fullScreenBtn": {},
            "durationLabel": {},
            "currentTimeLabel": {},
            "sourceSelector": {},
            "closedCaptions": {},
            "watermark": {
                "cssClass": "topLeft",
                "img": "http://www.kaltura.com/content/uiconf/kaltura/kmc/appstudio/kdp3/exampleWatermark.png"
            },
            "logo": {},
            "moderation":{},
            "infoScreen": {},
            "share": {},
            "related": {},
            "playbackRateSelector" :{}
        },
        "uiVars":[
            {
                "key":"Kaltura.UseAppleAdaptive",
                "value":false,
                "overrideFlashvar":false
            }
        ],
        "layout":{
            "skin": "kdark",
            "cssFiles":[ ]
        }
    };

    var mediaProxyEntry = {
        'preferedFlavorBR': 1600,
        'entry':{
            'id': "key_1",
            'name': "My ToolKit Video",
            "description": "Kaltura Player Toolkit Description.",
            "plays":1234,
            "views":47332,
            "duration":114,
            "createdAt":1379965720,
            "thumbnailUrl": 'http://cdnbakmi.kaltura.com/p/2027961/sp/202796100/thumbnail/entry_id/1_sf5ovm7u/version/100003/width/640'
        },
        'entryCuePoints': [{
            "protocolType": 1,
            "adType": 1,
            "cuePointType": "adCuePoint.Ad",
            "startTime": 4936,
            "sourceUrl": "http://projects.kaltura.com/mdale/hotelVastAd.xml"
        }],
        "contextData":{
            'isCountryRestricted': false
        },
        'entryMetadata': {
            'thumbSlicesUrl': 'http://cdnbakmi.kaltura.com/p/2027961/sp/202796100/thumbnail/entry_id/1_sf5ovm7u/version/100003/width/100/vid_slices/100',
            'AgeGroup': "16"
        },
        'sources':[
            {
                "src":"http://cdnbakmi.kaltura.com/p/2027961/sp/202796100/playManifest/entryId/1_sf5ovm7u/flavorId/1_4j0omqcl/format/url/protocol/http/a.webm",
                "width":"624",
                "height":"352",
                "bandwidth":"740352",
                "type":"video/webm; codecs=\"vp8, vorbis"
            },{
                "src":"http://cdnbakmi.kaltura.com/p/2027961/sp/202796100/playManifest/entryId/1_sf5ovm7u/flavorId/1_d2uwy7vv/format/url/protocol/http/a.mp4",
                "width":"640",
                "height":"360",
                "bandwidth":"1101824",
                "type":"video/mp4; codecs=\"avc1.42E01E, mp4a.40.2"
            },{
                "src":"http://cdnbakmi.kaltura.com/p/2027961/sp/202796100/playManifest/entryId/1_sf5ovm7u/flavorId/1_jl7y56al/format/url/protocol/http/a.mp4",
                "width":"1280",
                "height":"720",
                "bandwidth":"24117248",
                "type":"video/mp4; codecs=\"avc1.42E01E, mp4a.40.2"
            },
            {
                "src":"http://cdnbakmi.kaltura.com/p/2027961/sp/202796100/playManifest/entryId/1_sf5ovm7u/flavorIds/1_jl7y56al/format/applehttp/protocol/http/a.m3u8",
                "type":"application/vnd.apple.mpegurl"
            }
        ]
    }
    // do the embed:
    kWidget.embed('kaltura_player', {
        'wid' : '_2027961',
        'flashvars':{
            // json player config
            'jsonConfig':jsonConfig,
            // runtime overrides:
            'mediaProxy.preferedFlavorBR': 1600,
            // per entity settings:
            'mediaProxy': mediaProxyEntry
        }
    });
    kWidget.addReadyCallback(function(playerId){
//        window.kdp = document.getElementById("kaltura_player_1446547025");
        window.kdp = document.getElementById(playerId);
        kdp.sendNotification( "changeMedia", { 'entryId' : '1_fra2wjpe'});
    });

</script>
</body>
</html>

I might be missing something silly. Can you guide me around this one?


Viewing all articles
Browse latest Browse all 7410

Trending Articles