Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kaltura oEmbed not working in non-Open Textbooks themes #189

Open
josieg opened this issue Jul 8, 2019 · 12 comments
Open

Kaltura oEmbed not working in non-Open Textbooks themes #189

josieg opened this issue Jul 8, 2019 · 12 comments

Comments

@josieg
Copy link

josieg commented Jul 8, 2019

Description

We have recently completed switching all books out of the Open Textbooks theme. However, now the oEmbeds of Kaltura videos no longer work in the new themes.

I know Brad did something a while ago to make embedding Kaltura videos possible (See #167) in the Open Textbooks theme. So I don't know if this is something we have to replicate with the other themes, or if I need to report this to Pressbooks. From what I can find in the Pressbooks core resources, Pressbooks should support oEmbedding from any source, so I don't know why this is not working.

Expected behaviour

I expect that when I copy an oEmbed link for a Kaltura video into the Pressbooks visual editor (in any theme) that the video will automatically embed and be playable from the webbook.

Actual behaviour

When I copy the oEmbed link for a Kaltura video into the Pressbooks visual editor in any theme that is not the Open Textbooks theme, the link appears as plain text. The video player does not appear.

Steps to reproduce the problem

  1. Set your book to any non-OpenTextbooks theme (Clarke or McLuhan).
  2. Copy an oEmbed link from a Kaltura video.
  3. Paste the oEmbed link into the Pressbooks video editor.
  4. Wait for the video to embed. Nothing happens.
@greatislander
Copy link
Contributor

Hi @josieg! It looks like Brad embedded something like this: https://kb.wisc.edu/helpdesk/page.php?id=56746 in the Open Texbook theme. Here:

/**
* add BCC Kaltura instance endpoint
*/
add_action(
'init', function () {
wp_oembed_add_provider( 'https://video.bccampus.ca/id/*', 'https://video.bccampus.ca/oembed/', false );
}
);

It's not a bug you should report to Pressbooks, because the only way the Pressbooks team could fix it would be to add support for BCcampus' Kaltura instance to all Pressbooks networks. A member of your team should add that function (which enables BCcampus' Kaltura site) to a small drop-in plugin in your Pressbooks instance and it should work for all themes. (FYI @SteelWagstaff.)

@josieg
Copy link
Author

josieg commented Jul 8, 2019

Thanks @greatislander ! Much appreciated.

@alex-418
Copy link
Contributor

alex-418 commented Jul 8, 2019

@josieg This has been added to both of our PB instances and it works great. Please re-open if you encounter any issues.

@alex-418 alex-418 closed this as completed Jul 8, 2019
@josieg
Copy link
Author

josieg commented Jul 8, 2019

Woohoo! Thanks Alex :)

@SteelWagstaff
Copy link

Glad you got this worked out @josieg & @alex-418, and thanks for your help @greatislander! Alex, your solution would probably be of interest for other open source users -- if you've got time and inclination, you may be interested in submitting it to our https://github.com/pressbooks/snippets repo?

@dshaykewich
Copy link

@alex-418 -- can we further discuss this one? I'm wondering about:

  1. Is this still working now that we're not using the BCcampus custom theme (and just using McLuhan)?

  2. Can we add other institutions to the white list (so they can embed videos hosted in their Katuras into our pressbooks books)? @georgemeyer should have the list of other institutions' instances, as he acts as tier 2 support for Katura.

Clint Lalonde chatted with me and had previously built the code out as a plugin rather than a theme customization.
https://github.com/clintlalonde/oEmbed-BCcampus

@dshaykewich dshaykewich reopened this Oct 7, 2019
@alex-418
Copy link
Contributor

alex-418 commented Oct 7, 2019

@dshaykewich

  1. Confirmed it's still working, I have tested this just now.

  2. Yes other providers can be added, please see wp_oembed_add_provider

This functionality was moved into a plugin before we moved away from the theme.

@dshaykewich
Copy link

Thanks @alex-418 . I'll get in touch with @georgemeyer for the list of institution instances.

@kkilbey
Copy link

kkilbey commented Oct 11, 2019

The URL for JIBC is: https://video.jibc.ca/

@kkilbey
Copy link

kkilbey commented Oct 11, 2019

@alex-418 Please go ahead and whitelist the JIBC URL above. Someone at JIBC is trying to embed a Kaltura video in Pressbooks, so this one is the most urgent. We can whitelist the other institutions once we have those URLs. Thank you! :)

@alex-418
Copy link
Contributor

alex-418 commented Oct 12, 2019

@kkilbey Just saw the urgent comment on this. I've just added the JIBC url you've provided to the whitelist on pressbooks.bccampus.ca so their oEmbed links should now work as expected. One thing to note, is that I was not able to test this because I couldn't see the "share" tab with the oEmbed link in any of their videos on video.jibc.ca ... This might mean that they need to enable this feature. Also note, that media with permissions set to private will not work with oembed.

@paulagaube
Copy link

@alex-418 @dshaykewich Support has had a number of emails back and forth about getting a JIBC Kaltura video working in Pressbooks. I'll send you a copy of the whole email, because it won't paste in properly here.

FYI, @josieg helped me confirm that videos from the BCcampus Kaltura instance were successfully embedded and working properly on the Opentext Pressbooks site, here: https://opentextbc.ca/accessibilitytoolkit/back-matter/inclusive-design-webinar-series/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants