Rocket.chat: Faulty YouTube preview

Created on 5 May 2016  路  11Comments  路  Source: RocketChat/Rocket.Chat

On https://demo.rocket.chat if you paste YouTube share-link you can see different results:

https://www.youtube.com/watch?v=SWxvEbp1NjE - normal preview:
02

https://youtu.be/SWxvEbp1NjE - same video, but faulty prewiew:
01

Most helpful comment

I can confirm this and reproduce the issue; it has been like this for three or four versions back, if not more.

All 11 comments

This is ok, I don't need the big preview anytime and can choose now, please, leave this behavior.

This behavior is confusing ordinary users (we made a small focus group). The interface needs consistency.

@MichaelSavin, for perfect consistency we need to disable the youtube preview, because the short preview format is default for all types of urls;

@zxweed I've checked in Slack - both links give full preview.
IMHO this:
1) Consistently
2) Follow the rules of usability - to avoid unnecessary clicks / referrals
I have not tested the behavior in mobile- and desktop clients

Hi guy,
I install rocked.chat v 0.30, but when i send a youtube link, it doesn't show preview,
Here is config from: Rocket.Chat/programs/server/packages/rocketchat_oembed.js

providers.registerProvider({                                                                                   // 1
  urls: [new RegExp('https?://www.youtube.com/\\S+'), new RegExp('https?://youtu.be/\\S+')],                   // 33
  endPoint: 'https://www.youtube.com/oembed?maxheight=200'                                                     // 33
});

@marceloschmidt Please, reopen issue. In demo.rocketchat.com youtu.be links doesn't working. Try it: https://youtu.be/YlUKcNNmywk?list=RDYlUKcNNmywk

I can confirm this and reproduce the issue; it has been like this for three or four versions back, if not more.

Bump, this is still happening but it's worse now, no preview at all for youtu.be links.
This is the error that occurs

Exception in defer callback: SyntaxError: Unexpected end of input
     at Object.parse (native)
     at packages/rocketchat_oembed/server/providers.coffee:74:19
     at packages/rocketchat_lib/lib/callbacks.coffee:73:21
     at Array.reduce (native)
     at Object.RocketChat.callbacks.run (packages/rocketchat_lib/lib/callbacks.coffee:68:103)
     at Object.OEmbed.getUrlMeta (packages/rocketchat_oembed/server/server.coffee:135:30)
     at Object.OEmbed.getUrlMetaWithCache (packages/rocketchat_oembed/server/server.coffee:148:16)
     at packages/rocketchat_oembed/server/server.coffee:195:18
     at Array.forEach (native)
     at OEmbed.RocketUrlParser (packages/rocketchat_oembed/server/server.coffee:184:16)

version 072c5b0a

In Version 0.50.1 still an issue http://youtu.be/SWxvEbp1NjE
Short youtu.be links fail to preview

In Version 0.51.0 still no preview for youtu.be Links.

Its working on demo server on 0.57.0-rc.2 i'll go ahead and close this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lunitic picture lunitic  路  3Comments

mddvul22 picture mddvul22  路  3Comments

zeigerpuppy picture zeigerpuppy  路  3Comments

Kiran-Rao picture Kiran-Rao  路  3Comments

tanc picture tanc  路  3Comments