I added twitch stream support to video filter and would like to share.

Example video url:
http://www.twitch.tv/esfkamiab

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Cryr’s picture

ultimateboy’s picture

Status: Needs review » Needs work
Issue tags: -twitch, -twitch.tv

I'm fine with adding twitch support if whitespace issues in this patch as resolved.

Please refer to https://www.drupal.org/coding-standards if you have any questions.

NBZ4live’s picture

Hi. I made a project video_filter_twitch.
It adds a twitch.tv codec to the video filter.
It supports the normal channel/live streams and archive streams.

ultimateboy’s picture

Instead of creating a new module, I would have very quickly applied a patch that passed Drupal's coding standards. The code in your module looks great to just pull in as is.

I'll find some time to turn your module's code in to a patch and add it to this module soon... somebody can always help me out by providing the patch for me though :)

walangitan’s picture

Updated patch which uses the HTML5 iframe instead of flash for twitch. Simplified compared to the standalone module NBZ4live wrote video_filter_twitch. If we need the extra functionality I can port it over. This patch is simply embeds a twitch channel, similar to how their embed code would work.

Notes for testing
Used the following tokens for testing:

[video:http://www.twitch.tv/gamesdonequick]
[video:http://www.twitch.tv/ilovecookiiezz/v/33151692]

I am seeing an issue on simplytest.me where I am only able to get videos to render if the Limit allowed HTML tags filter is above the video filter in the filter processing order on the text formats configuration page. Twitch also returns an empty iframe on simpletest, but applying the patch on my local machine renders the full twitch iframe.

walangitan’s picture

Status: Needs work » Needs review
minnur’s picture

This has been added to D8 version of the module.

DamienMcKenna’s picture

Status: Needs review » Fixed

Committed.

minnur’s picture

Status: Fixed » Closed (fixed)