Hey there,
i have since some time the problem that the embedded player doesnt work properly with my responsive designs.
Im embedding my Player with this Code (from the official side):
<iframe class="twitch" src="https://player.twitch.tv/?channel=p4wnyhof&!autoplay" frameborder="0" allowfullscreen="true" scrolling="no"></iframe>
The channelname is just a placeholder.
Now here comes the Problem: In my responsive Design, when i look at the mobile-format, it plays well, because the player has enough size to display it. But when i look at the desktop-format, it just keeps loading, but doesnt play. If there would be a problem with the code, then it shouldnt be working in the mobile-format too. So i keep wondering: did i do smth wrong? Or is it some problem with my access to the api?
I have looked in chrome, firefox, IE and Opera, all 4 have the same problem.
I would like to give a link, but its localhost And no, theres nothing wrong with blocked port or whatever there can be.
I hope somebody can help.
//RE-EDIT: After switching my placeholder and updating firefox it worked. Very curiously it also works now on the other 3… I dont know why. Still there is the problem with the Tokens, in the reply below. And this time it still keeps after updating.
With Greetings.
And while we are at it:
Chrome:
(index):1 GET https://api.twitch.tv/api/viewer/token.json 401 ()
(index):1 GET https://api.twitch.tv/api/viewer/token.json 401 ()
(index):1 GET https://api.twitch.tv/kraken/user 401 ()
player.9520dd8….js:16 failed to resolve properties promise Object {readyState: 4, responseText: “{“error”:“Unauthorized”,“status”:401,“message”:“Token invalid or missing required scope”}”, responseJSON: Object, status: 401, statusText: “error”}(anonymous function) @ player.9520dd8….js:16
?channel=p4wnyhof&!autoplay:1 Uncaught (in promise) Object {readyState: 4, responseText: “{“error”:“Unauthorized”,“status”:401,“message”:“Token invalid or missing required scope”}”, responseJSON: Object, status: 401, statusText: “error”}
(index):1 GET https://api.twitch.tv/kraken/user 401 ()
player.9520dd8….js:16 failed to resolve properties promise Object {readyState: 4, responseText: “{“error”:“Unauthorized”,“status”:401,“message”:“Token invalid or missing required scope”}”, responseJSON: Object, status: 401, statusText: “error”}(anonymous function) @ player.9520dd8….js:16
player-core-min.js:1Uncaught TypeError: Cannot read property ‘initialized’ of null(…)t.buffered @ player-core-min.js:1t.getPlaybackStatistics @ player-core-min.js:1value @ player.9520dd8….js:20c.getStats @ player.9520dd8….js:28Te @ player.9520dd8….js:19
?channel=&!autplay:1 Uncaught (in promise) Object {readyState: 4, responseText: “{“error”:“Unauthorized”,“status”:401,“message”:“Token invalid or missing required scope”}”, responseJSON: Object, status: 401, statusText: “error”}
player-core-min.js:1 Uncaught TypeError: Cannot read property ‘initialized’ of null(…)t.buffered @ player-core-min.js:1t.getPlaybackStatistics @ player-core-min.js:1value @ player.9520dd8….js:20c.getStats @ player.9520dd8….js:28Te @ player.9520dd8….js:19
player-core-min.js:1 Uncaught TypeError: Cannot read property ‘initialized’ of null(…)
Firefox:
17
TypeError: this._safeMediaSource is null | player-…-min.js (Zeile 1, Spalte 9022)
…
It keeps going.
Those 401s are due to not being logged into Twitch. I get the same errors. It doesn’t harm the operation of the embed though.
Your edit says this works for you now, right? Just want to make sure.
system
Closed
January 13, 2017, 2:54pm
7
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.