I’m trying to embed a twitch player into my mobile app - but the parent is in the way.
Whenever I try to embed an Interactive Frame, I get the NoParent error. I’m using a web viewer and load the following HTML:
<!DOCTYPE html>
<html>
<head>
<script src="https://player.twitch.tv/js/embed/v1.js"></script>
<title>Twitch Embed Testing</title>
</head>
<body>
<div id="player"></div>
<script type="text/javascript">
var options = {
width: 854,
height: 480,
channel: "thqllium",
parent: ["localhost"]
};
var player = new Twitch.Player("player", options);
player.setVolume(0.5);
</script>
</body>
</html>
I’ve not only tried “localhost” as a parent, but the data:// URI and 127.0.0.1, but nothing has worked yet.
Does anyone have a solution for this?
I’d like this to have more control over the embed, so the user isn’t able to get the “follow” popup which will block the entire screen and which will make the app not working anymore.
Have you even read the docs? You can use player.setMuted(false) and player.setVolume(0.5) and such with the javascript library. I need that for my application, which wouldn’t be possible with the non-interactive embed
Oh, of course. I meant that if I can get an interactive frame working, I can disable the buttons on the stream it self and make the buttons myself, you know? So they don’t accidentally click on the user title instead of the play button etc.
Do not modify, replace, interfere with, block, cover, or obscure: (a) the functionality of embeddable experiences, including advertisements within the player; or (b) the Twitch Marks.
Would it also violate it if I recreate all the buttons/links, and create a confirmation popup for some?
Because once they click on the “follow” button there will appear a popup from the twitch to log in, and that makes it impossible to get back to the player (due to the phone screen being small)