Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Param
Type
Description
elementString or DOMNodeNode selector or DOMNode the player will be inserted into.
optionsObjectFrequency.Player.Options object

Player Fields

Frequency.

Param

TypeDescriptionDefault
urlStringThe video file url.-
startPositionNumberThe video start position0
autoplayBooleanAutoplay the video after it is loaded.

false

 
hlsBooleanEnables MP4 HLS playerfalse
adConfigObject

Player

...

 

Player Constructor

Code Block
languagejs
new Frequency.Player({
    config: {
        basePath: '.'
    },
    session: {
        'x-frequency-auth': '013ffaa2-a64e-4974-a9ee',
        'x-frequency-deviceid': '5680c4f2-e3fd'
    },
    adConfig: {
        minBitrate: 100,
        maxBitrate: 5000,
        maxResolution: '720p',
        deliveryFormat: 'progressive'
    },
    video: {
        "video_id": "12345",
        "title": "Gangnam Style",
        "description": "Good Dance Video",
        "image_url": "http://image1.frequency.com/uri/w{width}_h{height}_ctrim_tt1406242656000/_/item/1/8/3/2/Kelsey_Grammer_Welcomes_6th_Child_183236961_thumbnail.jpg",
        "deep_link": "frequency://video/12345/-/4-895",
        "media_url": "http://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4",
        "media_type": "h264",
        "media_types": ["h264", "hls"],
        "resolution": "1080p",
        "resolutions": ["1080p", "720"],
        "duration": 3600,
        "source": "Online",
        "source_id": "X8yZ4f",
        "source_url": "http://www.eonline.com/videos/223996/kelsey-grammer-welcomes-6th-child",
        "score": 126,
        "meta_tags": [
            {"network": "Machinima"},
            {"genre": "Gaming"},
            {"subgenre": "Action"},
            {"series": "Random LOL Moments"},
            {"season": "1"},
            {"episode": "489"}
        ],
        "channel": {
            "channel_id": "4-1234",
            "title": "News",
            "image_url": "http://image1.frequency.com/uri/w{width}_h{height}/_/user/1/8/5/0/1385085551000_abc_nightly_news_1850953_avatar.jpg",
        },
        "referrer_link": "https://twitter.com/zgutierrez90/status/446459061161451520",
        "ad_tag": "https://pubads.g.doubleclick.net/gampad/ads?sz=640x480&iu=%2F105934051%2FtestAdUnit&impl=s&gdfp_req=1&env=vp&output=vast&unviewed_position_start=1&url=[referrer_url]&description_url=[description_url]&correlator=1485732061110",
        "ad_cue_points": [0],
        "date_publish": "2014-07-29T14:18:10Z",
        "date_available": "2014-07-29T14:18:10Z",
        "date_expired": "2014-07-29T14:18:10Z",
        "last_updated": "2014-07-29T14:18:10Z",
        "autoplay": true
    },
    events: {
    	onStateChange(state) {
			...
		}  
    }
})

           

...