jakemiki / twitch-clip-queue

A simple, setup free clip queue for all your Twitch clip queueing needs
https://jakemiki.me/twitch-clip-queue/
MIT License
87 stars 13 forks source link

Adding support for TikTok videos #13

Closed leungbk closed 1 year ago

leungbk commented 1 year ago

I am interested in adding support for TikTok videos, but there doesn't seem to be a good way to make them work well with the queue's autoplay feature, according to GPT-4:

### upon reaching the end of a TikTok video, will the video emit any kind of documented event that can be used in a program that needs to know when the video has concluded?

As of my last training data in September 2021, TikTok does not provide a public JavaScript API for developers to interact with their video player.

Normally, with an HTML5 video player, you can add an "ended" event listener to the video tag in JavaScript. But websites like TikTok manage their video content within protected scopes which restrict this kind of interaction.

Moreover, the videos aren't played using the traditional HTML5 video tag - instead, they use a customized video player, which makes it even more difficult to add event listeners.

So, without official documentation or public API provided, there is no straightforward or reliable way to programmatically determine when a TikTok video has ended.

Please verify this with current date scenario as things might have been changed after my last training cut-off.

I asked TikTok support the other day if they provided a relevant API, but I'm not sure if they'll get back to me.

Assuming there's no way to make TikTok videos work with autoplay, would you accept a PR that adds TikTok support? (possibly disabled by default)

leungbk commented 1 year ago

Friendly ping @JakeMiki

jakemiki commented 1 year ago

In that case, it would be nice to inform the user that TikTok videos and autoplay are not supported together. Maybe disable the autoplay switch and add a tooltip informing why it is disabled? We can figure something out :)

leungbk commented 1 year ago

Thanks for your response.

I realized today that TikTok does not generate any embed code for slideshows comprised entirely of photos. Since I don't think it's reasonable to expect clip-queue submitters to submit only TikTok videos and to refrain from submitting slideshows, I don't intend to implement TikTok support anymore.