Skip to content
This repository has been archived by the owner on Dec 6, 2018. It is now read-only.

Fire event when scene is loaded #328

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/api/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ Player.prototype.onMessage_ = function(event) {
case 'click':
case 'ended':
case 'getposition':
case 'loadedscene':
this.emit(type, data);
break;
case 'volumechange':
Expand Down
5 changes: 5 additions & 0 deletions src/embed/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ function onRenderLoad(event) {

isReadySent = true;
}

// Notify the scene has been loaded.
Util.sendParentMessage({
type: 'loadedscene'
});
}

function onPlayRequest() {
Expand Down