Embeds not working properly

So I’m working on a website that’s using Teich Player embeds. When i try to embed and call the video id’s and channels, the information comes in but the video does not load nor play. The video embed does have the information such as the streamer, stream status, and the title but no video.

I have set up a codepen: http://codepen.io/jharrelson/pen/grxwvG

I am pulling the information from this API url: https://api.twitch.tv/kraken/channels/daygon07/videos?broadcasts=true

Am i missing something. I’m using both methods (https://github.com/justintv/Twitch-API/blob/master/embed-video.md) and unable to get the videos from this stream to work.

Removing channel from the options object allows it to play for me:

<script src= "//player.twitch.tv/js/embed/v1.js"></script>
<div id="player"></div>
<script type="text/javascript">
    var options = {
        width: 854,
        height: 480, 
        video: "v75527399"       
    var player = new Twitch.Player("player", options);

(Note: I removed the protocol from the script source since Chrome blocked Codepen from accessing mixed content sources.)

@george has it right. You should use either channel or video for your options. You would use channel for a livestream and video for a VOD.

Thanks guys this solved my problem, it’s one or the other not both.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.