Clips Découverte Autoplay (zuhayrx)

Hi, I’m using the clip discovery feature as described here on my website: https://dev.twitch.tv/docs/v5/guides/clips-discovery/

I’m looking for a way to stop autoplay

PS: put autoplay = false in my query does not work!

httpRequest.open('GET', 'https://api.twitch.tv/kraken/clips/top?limit=10&game=Overwatch&trending=true&autoplay=false');

I know that the member (zuhayrx) has already made a post on this subject and that he may have a solution but he did not indicate it in his post : Clips Discovery Autoplay Off?

Can you help me?
Thank you

Err you’ve posted a API request. Nothing about embedding clips.

Embedding is documented here

Thank you BarryCarlyon but the integration of clips does not allow me to sort the clips (by quantity, by trend, in 24h, 7j …) that’s why I use the API request.

But all the clips that appear on my page using this are in autoplay:

function clipsLoaded() {
var clipsDisplay = document.getElementById(‘clips-display’),
clipList = JSON.parse(httpRequest.responseText);

clipList.clips.forEach(function(clip, index, array) {
    clipItem = document.createElement('div');
    clipItem.innerHTML = clip.embed_html;
    clipsDisplay.appendChild(clipItem);
	

});

}

Is it not possible to modify this JS code to deactivate the autoplay?
Sorry I’m a beginner :sweat_smile:

First you must use the Clips Fetch API to fetch the clips you want to display.

Then use the response with the embed API to display the clips, and the embed API is what supports the autoplay flag.

Thanks a lot, would not you have a script template Clips Fetch API that I could use as a base?
Because I am a novice in development, just a little model of clip recovery, after I managed for the rest.

Thanks again for your answers and your help :wink:

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