Restructure shim/bridge initialization steps

This commit is contained in:
hensm
2019-02-10 06:31:31 +00:00
parent a1101d6cf6
commit 1c55b67922
8 changed files with 181 additions and 139 deletions

View File

@@ -16,7 +16,7 @@ window.chrome.cast.media = media;
onMessage(message => {
switch (message.subject) {
case "shim:initialized": {
case "shimInitialized": {
const bridgeInfo = message.data;
// Call page's API loaded function if defined
@@ -28,8 +28,3 @@ onMessage(message => {
};
}
});
// Trigger bridge mDNS discovery
sendMessage({
subject: "main:initialize"
});