Skip to content

Commit 33590ee

Browse files
authored
Merge pull request #16 from justicointeractive/master
don't load from protocol-relative url
2 parents de6a8d0 + 8b66e91 commit 33590ee

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/loadImaSdk.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ interface ImaWindow {
77
};
88
}
99

10-
const imaSdkSrc = "//imasdk.googleapis.com/js/sdkloader/ima3.js";
10+
const imaSdkProtocol = location.protocol === "http:" ? "http:" : "https:";
11+
const imaSdkSrc = imaSdkProtocol + "//imasdk.googleapis.com/js/sdkloader/ima3.js";
1112
let pendingPromise: Promise<typeof google.ima> | null = null;
1213

1314
const promiseFinished = () => {

0 commit comments

Comments
 (0)