Page tree

Versions Compared

Key

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

...

During player initialisation player is checking if provided session is still valid by calling API:

Code Block
languagebash
titleSession verification
curl 'http://qa-lgi-api.frequency.com/api/2.0/auth/session' -H 'x-frequency-auth: bdd6c80b-5fb8-4957-b140-a0c26747e45b' -H 'x-frequency-deviceid: 58f67176-743f-d762' --compressed
Code Block
languagejs
titleSession response
{  
   "country":"PL",
   "user_agent":"Paw/3.1.7",
   "device_id":"58f67176-743f-d762",
   "token":{  
      "token_access":"bdd6c80b-5fb8-4957-b140-a0c26747e45b",
      "token_refresh":"0c6d9018-8f4a-483b-9e35-dd21f2715748",
      "roles":[  
         "ROLE_ANONYMOUS",
         "ROLE_USER"
      ]
   },
   "app_name":"telenet",
   "app_id":"6394703612760826080",
   "user_id":"6410435873178213705",
   "session_id":"035c2005-761a-4c85-a1f6-9e3640c743ea",
   "account_id":"6113878517855336672"
}

When session is valid player stores account_id for future DS calls and is ready to load video feed. This is done by executing one of the functions:

  • loadVideo
  • loadChannel
  • loadPlaylist

Example call looks like one below:

Code Block
languagebash
titleLoad channel videos
curl 'http://qa-lgi-api.frequency.com/api/2.0/channels/6341811119618533518/videos' -H 'x-frequency-auth: bdd6c80b-5fb8-4957-b140-a0c26747e45b' -H 'x-frequency-deviceid: 58f67176-743f-d762' --compressed
Code Block
languagejs
titleList of videos to play
{  
   "videos":[  
      {  
         "title":"Jeff Sessions Says U.S. May Use DNA Tests to Verify Family Relationships at Border",
         "description":"Attorney General Jeff Sessions may use DNA tests to verify the relationship between children and adults who cross the border illegally! Rob Smith (@robsmithonline) has all the details.",
         "resolution":"1280x720",
         "resolutions":null,
         "duration":59,
         "source":"Veuer",
         "score":0,
         "channel":{  
            "title":"Veuer",
            "channel_id":"6341811119618533518",
            "image_url":"https://qa-freq-images.frequency.com/channel/1rbhzt34412fd16ps1zgrx35f/original/1rbhzt34412fd16ps1zgrx35f.jpg"
         },
         "video_id":"6415162182727646499",
         "content_partner_id":null,
         "image_url":"https://qa-freq-images.frequency.com/video/1p1gxhsswx8re1xi6lyzl1srs/original/1p1gxhsswx8re1xi6lyzl1srs.jpg",
         "media_url":"https://qa-freq-media.frequency.com/videos/6415162182727646499/C3VHmxAgS-G4.mp4",
         "media_type":"h264",
         "media_types":[  
            "h264",
            "hls"
         ],
         "deep_link":"frequency://video/6415162182727646499",
         "source_id":"video7316576222416856667",
         "source_url":"https://qa-freq-media.frequency.com/videos/6415162182727646499/1p1gxhsswx8re1xi6lyzl1srs.mp4",
         "meta_tags":null,
         "referrer_link":"http://www.frequency.com/video/jeff-sessions-says-u.s.-/6415162182727646499?cid=6341811119618533518",
         "ad_tag":null,
         "ad_cue_points":[  
            0
         ],
         "date_publish":"2018-06-20T11:09:00Z",
         "date_available":"2018-06-20T11:28:26Z",
         "date_expired":null,
         "last_updated":"2018-06-20T11:28:26Z"
      },
      ...
   ],
   "page":{  
      "page_id":null,
      "page_size":30,
      "page_offset":"1",
      "page_mark":null
   }
}

 

For selected video player is creating DS call to fetch ad info. Request contains:

  • video data
  • session data
  • counters object (see below)
  • additional ad parameters described in plugins section of player

Code Block
languagebash
titleDS ad call
curl 'http://qa-freq-ad-eu.frequency.com/2.1/ad_request' -H 'Content-Type: application/json; charset=utf-8' -H 'Accept: application/json' --data-binary '{"IMA":false,"session":{"account_id":"6113878517855336672","device_id":"58f67176-743f-d762","token_access":"bdd6c80b-5fb8-4957-b140-a0c26747e45b","user_id":"6410435873178213705"},"counters":{},"video":{"title":"Jeff Sessions Says U.S. May Use DNA Tests to Verify Family Relationships at Border","description":"Attorney General Jeff Sessions may use DNA tests to verify the relationship between children and adults who cross the border illegally! Rob Smith (@robsmithonline) has all the details.","resolution":"1280x720","resolutions":null,"duration":59,"source":"Veuer","score":0,"channel":{"title":"Veuer","channel_id":"6341811119618533518","image_url":"https://qa-freq-images.frequency.com/channel/1rbhzt34412fd16ps1zgrx35f/original/1rbhzt34412fd16ps1zgrx35f.jpg"},"video_id":"6415162182727646499","content_partner_id":null,"image_url":"https://qa-freq-images.frequency.com/video/1p1gxhsswx8re1xi6lyzl1srs/original/1p1gxhsswx8re1xi6lyzl1srs.jpg","media_url":"https://qa-freq-media.frequency.com/videos/6415162182727646499/C3VHmxAgS-G4.mp4","media_type":"h264","media_types":["h264","hls"],"deep_link":"frequency://video/6415162182727646499","source_id":"video7316576222416856667","source_url":"https://qa-freq-media.frequency.com/videos/6415162182727646499/1p1gxhsswx8re1xi6lyzl1srs.mp4","meta_tags":null,"referrer_link":"http://www.frequency.com/video/jeff-sessions-says-u.s.-/6415162182727646499?cid=6341811119618533518","ad_tag":null,"ad_cue_points":[0],"date_publish":"2018-06-20T11:09:00Z","date_available":"2018-06-20T11:28:26Z","date_expired":null,"last_updated":"2018-06-20T11:28:26Z"},"params":{"url":"//qa-freq-ad-eu.frequency.com","minBitrate":100,"maxBitrate":5000,"maxResolution":"720p","minResolution":"720p","deliveryProtocol":"https","format":"video/mp4","CHILD_DIRECTED_CONTENT":false},"device":{"DNT":1,"advertisingId":"","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36","connectionType":"wifi","countryCode":"US","timeZone":-2,"locale":"en-US","language":"en","capability":["VPAID","VAST","MRAID"],"category":"desktop"},"application":{"name":"Web","domain":"com.frequency","storeLocation":"","bundle":"com.frequency.player-3.1"}}' --compressed

This will produce JSON containing ad data or empty response if ad should not be displayed (more below)

Code Block
languagejs
titleAd data
{  
   "VAST":{  
      "version":3,
      "ad":{  
         "id":"94691571",
         "inLine":{  
            "adSystem":"GDFP",
            "adTitle":"Mountain Dew NBA",
            "description":"Mountain Dew NBA ad",
            "error":[  
               "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=videoplayfailed[ERRORCODE]"
            ],
            "impression":[  
               "http://pubads.g.doubleclick.net/pcs/view?xai=AKAOjsvdVj_cxz0fwuQcC65H3U2j_GegtDEvbT_z_JWt2zrFC361C4AJM885ooCz66XTeOYJ28lg_SyEA7nDuK61IZWXsevp_8GpXHilXGR9wap0vrndyInz7zpGviqyfX6qBACXqu1GjJ4CroW1Kdc55dS981D_J4hC_ZMspaDhd3MYAVL_6BX2pNXXoXjxUybye0VFtNdw9eAOwqG0HtEX_gsLO1ZeTzjFiEccluIVOC4&sig=Cg0ArKJSzEscm6_-DknEEAE&adurl="
            ],
            "creatives":[  
               {  
                  "id":"107074364451",
                  "sequence":1,
                  "skipoffset":5,
                  "duration":30,
                  "trackingEvents":{  
                     "start":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=part2viewed&ad_mt=[AD_MT]"
                     ],
                     "firstQuartile":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=videoplaytime25&ad_mt=[AD_MT]"
                     ],
                     "midpoint":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=videoplaytime50&ad_mt=[AD_MT]"
                     ],
                     "thirdQuartile":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=videoplaytime75&ad_mt=[AD_MT]"
                     ],
                     "complete":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=videoplaytime100&ad_mt=[AD_MT]"
                     ],
                     "mute":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=admute&ad_mt=[AD_MT]"
                     ],
                     "unmute":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=adunmute&ad_mt=[AD_MT]"
                     ],
                     "rewind":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=adrewind&ad_mt=[AD_MT]"
                     ],
                     "pause":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=adpause&ad_mt=[AD_MT]"
                     ],
                     "resume":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=adresume&ad_mt=[AD_MT]"
                     ],
                     "fullscreen":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=adfullscreen&ad_mt=[AD_MT]"
                     ],
                     "creativeView":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=vast_creativeview&ad_mt=[AD_MT]"
                     ],
                     "exitFullscreen":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=vast_exit_fullscreen&ad_mt=[AD_MT]"
                     ],
                     "acceptInvitationLinear":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=acceptinvitation&ad_mt=[AD_MT]"
                     ],
                     "closeLinear":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=adclose&ad_mt=[AD_MT]"
                     ],
                     "skip":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=videoskipped&ad_mt=[AD_MT]"
                     ],
                     "progress":[  
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=video_skip_shown&ad_mt=[AD_MT]",
                        "http://pubads.g.doubleclick.net/pagead/conversion/?ai=BHF2xXE0qW6CmD4qNxwLw_avABeHCp5JFAAAAEAEgq9bfKDgAWKPIhPGOA2Dp5JqP8Bq6ARMzMzZ4MjY5LDY0MHg0ODBfeG1syAEFwAIC4AIA6gIQLzEwNTkzNDA1MS9sZ2kuLvgC8NEekAPIBpgDrAKoAwHQBJBO4AQB0gUFEPPBky2QBgGgBiOoB5jOG9gHAeAHH9IICQiA4YBwEAEYAw&sigh=jqiKXXJbZho&label=video_engaged_view&ad_mt=[AD_MT]"
                     ]
                  },
                  "adParameters":"deployment=devsite,sample_ct=skippablelinear",
                  "mediaFiles":[  
                     {  
                        "id":"GDFP",
                        "delivery":"progressive",
                        "width":"1280",
                        "height":"720",
                        "type":"video/mp4",
                        "bitrate":"1383",
                        "scalable":"true",
                        "maintainAspectRatio":"true",
                        "url":"http://redirector.gvt1.com/videoplayback/id/133827f22597d9ad/itag/22/source/gfp_video_ads/acao/yes/mime/video%2Fmp4/ip/0.0.0.0/ipbits/0/expire/1529520572/sparams/ip,ipbits,expire,id,itag,source,acao,mime/signature/64EFDDA91086C08874D6578EC67670819C6CFECC.08E71F290F6BA79E41C2E53A3F5E5838965D955F/key/ck2/file/file.mp4"
                     }
                  ],
                  "videoClicks":{  
                     "clickThrough":"http://pubads.g.doubleclick.net/pcs/click?xai=AKAOjssrwKE5tRgppmtIua9Gbn5CFpK-fKKhsF9mc-YDeYK4Eycg3BShVD9mapIpOs4De5c7SSHPIVjD848DTHsiLNKEyH2hRFM8z1SQCRSsHXNTsUIvXSPGeiqldBZ3xRNV4ml3g-hibRWfaA7dAsMdAS2kem-rmkLaxMD7HAc_Kl_FLoBowTbJYLFX-Sz2ZXGssEDaHn4Fpc2SK3xvblW2h6fjZgiXxAF093q7&sig=Cg0ArKJSzHcKKy8z9YPN&adurl=http://www.frequency.com/"
                  }
               }
            ]
         }
      }
   }
}