Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#61 2018-04-24 13:51:21

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 310
Website GitHub GitLab Mastodon Twitter

Re: oui_player (formerly oui_video) - Easily embed customized players

Yes, I have applied your code from the forum twice. Unfortunately, the second (replaced) code broked video pages, and upgrade from Github not removed duplicated divs, too. Sorry, I have not saved your first code, and it is replaced now on the forum.

Offline

#62 2018-04-24 14:03:12

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

If you can send me an admin access I can quickly take a look, otherwise I can’t do much more for now. It does work for me.

Last edited by NicolasGraph (2018-04-24 14:03:42)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#63 2018-04-24 14:17:50

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 310
Website GitHub GitLab Mastodon Twitter

Re: oui_player (formerly oui_video) - Easily embed customized players

I’ve sent, via internal mail of the forum.

Offline

#64 2018-04-24 15:27:17

Vienuolis
Member
From: Vilnius, Lithuania
Registered: 2009-06-14
Posts: 310
Website GitHub GitLab Mastodon Twitter

Re: oui_player (formerly oui_video) - Easily embed customized players

All videos play smoothly now, thank you, Nicolas. When sometimes video source stop working, the plugin does not show it, although inserts <div class="grotuvas" /> with no </div>, thus broking webpage. Such cases can occur quite rarely, though, only due an invalid not empty custom field.

Last edited by Vienuolis (2018-04-24 15:28:01)

Offline

#65 2018-04-25 07:28:23

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

Vienuolis wrote #311381:

When sometimes video source stop working, the plugin does not show it, although inserts <div class="grotuvas" /> with no </div> […]

Thanks for the report. I’ll try to improve the plugin behavior in such cases in the future.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#66 2018-06-26 14:36:14

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

oui_player v2.0.0-BETA1 is released.

The main change is that it is now divided in several plugins…
oui_player stays the main plugin, then oui_provider is needed to extend it as it now comes without any included provider support.

Once these two plugins installed, you are free to add any of the following extension:

This last release also allow to embed players responsively.
Unfortunatly it is not available via Composer for now.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#67 2018-06-28 07:23:53

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

Here is oui_provider v1.0.0-BETA2. It should ensure HTML5 valid player embedding.
oui_audio and oui_video should also be updated to their -BETA2 version to beneficiate to this feature.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#68 2018-07-05 13:48:18

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

FYI, oui_player, oui_provider and all related extensions have just been released to new Bêta versions.


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

#69 2018-07-25 10:11:42

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,719
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

Hi Nicolas,

I’ve been using your updated oui_player to parse vimeo links and it works nicely :-) Thanks for continuing to improve it! I’ve been able to much simplify the previous pasted embed code. Having the preset preferences also makes it much easier for users as it avoids the need to insert code into the admin area, and when they do need to, then with the minimum possible attributes. Nice!

Two questions:

  1. Is it possible to retrieve the respective vimeo video’s aspect ratio? The site I’m working on currently uses a custom field to set widescreen or not in a custom field, e.g. requires user input, but I wonder if that can now be automatically discovered.
  2. I’m facing the same problem of what to do when a user denies cookies / privacy settings and saw your comment here which suggests you may be adding the possibility to “view on cookie consent”. I can, of course, wrap the entire tag in a oui_cookie tag and simply not show the video at all, but I wondered if you’d come up with a better alternative.

I haven’t found a nocookie link for vimeo videos like there is for youtube, so my preference would be to show the vimeo cover image with a click at the moment the page is viewed also sends the user’s browser details to vimeo.

An idea: might it be possible to add a function that hooks into the article_save callback, reads out the video “play” id from the video field (as specified in oui_player prefs) and caches the cover image as a file in the local installation, e.g as the vimeo ID# prefixed with the video-service for later use? In the case of vimeo, the cover image can, I believe, be legally retrieved from an XML file with the video’s ID (as described here). By caching it when saving and then using that image for the “cookie-safe” preview, the user’s browser would only need to make contact with vimeo when the user actually clicks to view.


TXP Builders – finely-crafted code, design and txp

Offline

#70 2018-07-25 13:58:32

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,081
Website GitHub Mastodon Twitter

Re: oui_player (formerly oui_video) - Easily embed customized players

jakob wrote #313128:

2. I’m facing the same problem of what to do when a user denies cookies / privacy settings and saw your comment here which suggests you may be adding the possibility to “view on cookie consent”. I can, of course, wrap the entire tag in a oui_cookie tag and simply not show the video at all, but I wondered if you’d come up with a better alternative.

Hi Julian

From vimeo

Vimeo video player: Vimeo’s embeddable video player uses first-party cookies that we consider essential to the video player experience. We do not use third-party analytics or advertising cookies when our video player appears on a third-party website. (vimeo.com/cookie_policy)

I have mine in a vimeo shorttag found here.

Last edited by colak (2018-07-25 13:59:22)


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#71 2018-07-25 15:32:36

jakob
Admin
From: Germany
Registered: 2005-01-20
Posts: 4,719
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

Thanks for the pointer to your shorttag, Yiannis.

Yes, the idea would be, like yours, to not start any interaction with vimeo (or whatever) until the user has either globally given consent (general cookie consent), or decides to override his or her decision to decline consent to see a particular video.

To make that choice (“am I interested in this video?”) a visitor will want to see some idea of what the video is about, otherwise the videos are essentially ‘redacted’ out of the website and are only present as a meaningless link. I think that’s in effect punishing users for opting for personal privacy. And the site owner’s will not be happy to see ‘holes’ in place of what they hoped would be dynamic, compelling content.

In your version, you tackle that by describing what the video contains in words. That’s a valid approach but means more work for site authors. In my case, I’m reworking a site in a language I don’t speak, so I can’t do that myself. The site authors won’t be happy if I tell them they need to provide text descriptions for all their videos.

The intention behind my idea is to pre-fetch the cover images as the site admin when saving the articles, then to show the pre-fetched cover image with a play button and notice to users who have opted out. The end result would be:

  • The site authors’ site looks pretty much the same as it did before
  • The visitors’ experience of the site is similar with two small differences:
    • they don’t reveal themselves to vimeo unless they choose to click and play.
    • there’s an additional notice alongside the play button.

As the cover image was already defined by the video author, so the site authors have no extra work.

Nicolas, what do you think? Is that do-able?


TXP Builders – finely-crafted code, design and txp

Offline

#72 2018-07-26 09:28:06

NicolasGraph
Plugin Author
From: France
Registered: 2008-07-24
Posts: 860
Website

Re: oui_player (formerly oui_video) - Easily embed customized players

jakob wrote #313128:

  1. Is it possible to retrieve the respective vimeo video’s aspect ratio? The site I’m working on currently uses a custom field to set widescreen or not in a custom field, e.g. requires user input, but I wonder if that can now be automatically discovered.

Unfortunatly, it can’t be as for now. To easily embed customized players in the fastest way, oui_player does not use any provider API. Using oembed (it is what is ussually proposed) would permit this kind of thing but would also hit the performance because of the external queries.
I think to add a way to smartly manage providers API for some time, but it still needs some thinking.

I’m facing the same problem of what to do when a user denies cookies / privacy settings and saw your comment here which suggests you may be adding the possibility to “view on cookie consent”. I can, of course, wrap the entire tag in a oui_cookie tag and simply not show the video at all, but I wondered if you’d come up with a better alternative.

I’m afraid that you need to wrap the entire tag for now.
In fact, in parallel of the oui_cookie development, I recently worked on a more generic plugin alternative named oui_globals which is now able to manage $_GET, $_POST, $_COOKIE and $_SESSION. It is during this plugin development that I played with global attributes such as if_cookie. While this plugin base seems to work it still needs to be documented and in theory if_cookie should be named oui_if_cookie. But, anyway, this global attribute would not let you choose an alternative content. To use an else condition you would still need to wrap the entire tag.

I haven’t found a nocookie link for vimeo videos like there is for youtube […]

Yes, I don’t think Vimeo provide this kind of URL.

[…] so my preference would be to show the vimeo cover image with a click at the moment the page is viewed also sends the user’s browser details to vimeo.

An idea: might it be possible to add a function that hooks into the article_save callback, reads out the video “play” id from the video field (as specified in oui_player prefs) and caches the cover image as a file in the local installation, e.g as the vimeo ID# prefixed with the video-service for later use? In the case of vimeo, the cover image can, I believe, be legally retrieved from an XML file with the video’s ID (as described here). By caching it when saving and then using that image for the “cookie-safe” preview, the user’s browser would only need to make contact with vimeo when the user actually clicks to view.

As I previoulsy said, oui_player does not use any API such as the Vimeo one you mentioned (for Youtube and Dailymotion I could add thumbnails like drmonkeyninja in his cakephp-video-helper as image URL’s are predictable).
Your idea to get and save or cache the content provided by an API on saving is interesting, but I guess it should also work when the play attribute is not provided through a field (e.g. video embed in a page or a form). Let me think about that, but do not expect this kind of feature very soon.

Last edited by NicolasGraph (2018-07-26 09:32:39)


Nicolas
Follow me on Twitter and GitHub!
Multiple edits are usually to correct my frenglish…

Offline

Board footer

Powered by FluxBB