Versions Compared

Key

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

.EMBED_PLAYER_ADDED_TO_DOM

...

Code Block
languagejs
themeDJango
{
	type:"PLAYER_TIME_UPDATE",
   	data:{
		videoId:"44df4sdfs55erw444wefw1", // the id of the touchcast video
    	playerId:"player_01" // the unique player id that was set when the player was embedded
   		time:"1.38746" // the current timecode of the player in seconds
	}
}


...

.INTERACTIVE_EVENT

This event is dispatched after interactive event in an embed player.


How to subscribe?

Code Block
languagejs
themeDJango
TouchCastPlayerAPI.Event.subscribe(TouchCastPlayerAPI.events.INTERACTIVE_EVENT, callback);


Example of the e callback argument

Code Block
languagejs
themeDJango
{
	type:"INTERACTIVE_EVENT",
   	data:{
		videoId:"44df4sdfs55erw444wefw1", // the id of the touchcast video
    	playerId:"player_01" // the unique player id that was set when the player was embedded
   		mode:"TCINTC",
		event:"OPEN",
		info:{
			x:0.5461847389558233,
			y:0.7534582775546631,
			title:"Hls tc in tc",
			time:19.920502,
			id:"2",
			type:"html",
			url:"tc-player://load-touchcast?id=ba37868a3afa4fd2a449b5d02a0c7b1e",
		}
	}
}

{
	type:"INTERACTIVE_EVENT",
   	data:{
		videoId:"44df4sdfs55erw444wefw1", // the id of the touchcast video
    	playerId:"player_01" // the unique player id that was set when the player was embedded
   		mode:"TCINTC",
		event:"CLOSE",
		info:{
			type:"html",
		}
	}
}

{
	type:"INTERACTIVE_EVENT",
   	data:{
		videoId:"44df4sdfs55erw444wefw1", // the id of the touchcast video
    	playerId:"player_01" // the unique player id that was set when the player was embedded
   		mode: null,
		event:"FAIL",
		info: null
	}
}