Wowza Community

how to use the wowza player in my web page from rest api

I got the player for my stream from rest api cloud

following is my response from api

array:18 [▼
  "id" => "rnxmdjfb"
  "transcoder_id" => "nvyh2jpj"
  "type" => "wowza_player"
  "responsive" => false
  "width" => 640
  "countdown" => true
  "countdown_at" => "2017-12-29T19:00:00.000Z"
  "embed_code" => "<div id='wowza_player'></div><script id='player_embed' src='//player-sandbox.cloud.wowza.com/sandbox/rnxmdjfb/wowza.js' type='text/javascript'></script>"
  "hds_playback_url" => "https://c8ad36-sandbox.entrypoint.cloud.wowza.com/app-c5a2/ngrp:f0aa5cf1_all/manifest.f4m"
  "hls_playback_url" => "https://c8ad36-sandbox.entrypoint.cloud.wowza.com/app-c5a2/ngrp:f0aa5cf1_all/playlist.m3u8"
  "hosted_page" => true
  "hosted_page_title" => "My Hosted Page"
  "hosted_page_url" => "https://player-sandbox.cloud.wowza.com/sandbox/rnxmdjfb/player.html"
  "hosted_page_description" => "My Hosted Page Description"
  "hosted_page_sharing_icons" => true
  "created_at" => "2019-06-25T13:53:17.000Z"
  "updated_at" => "2019-06-25T13:53:18.000Z"
  "links" => array:3 [▶]
]

Now how can i embed this player to my page?

Thanks.

To make API calls @Hidayat Ullah, you must add a WowzaPlayer object instance to your webpage to interact with.

Our Getting started with Wowza Player tutorial explains the steps for accessing and embedding Wowza Player in your webpage. Player embed code should resemble the sample code below:

<HEAD>
	<script type="text/javascript" src="//player.wowza.com/player/latest/wowzaplayer.min.js"></script>
</HEAD>

<BODY>
	<div id="playerElement" style="width:100%; height:0; padding:0 0 56.25% 0"></div>
	<script type="text/javascript">
	var myPlayer = WowzaPlayer.create('playerElement',{
               "license":"[wowza-player-license-key]",
               "sourceURL":"https%3A%2F%2F%5Bwowza-ip-address%5D%3A1935%2Fvod%2Fmp4%3Asample.mp4%2Fplaylist.m3u8"}
         );
	</script>
</BODY>

https://www.wowza.com/docs/wowza-player-javascript-api-overview

from where i can get license key

You can request a Player license by logging into the link below with your account credentials for Cloud and following the instructions.

https://www.wowza.com/player/sign-in

You get access to Wowza Player automatically when you use Cloud or Engine. Use the same username and password to login to the Player link above as your Cloud account.