Opencast-Moodle / moodle-mod_opencast

Moodle activity plugin which can be used to display and view Opencast episodes and series in Moodle. Teachers can link the activity to an existing Opencast episode or series and an embedded player allows students to watch these videos directly in Moodle.
Other
4 stars 7 forks source link

Avoid accessing undefined $media->width #9

Closed Rillke closed 3 years ago

Rillke commented 3 years ago

When Opencast encodes and publishes audio-only tracks, they won't have a width or height set causing PHP warnings.

Instead, set h and w to zero if no video exists like Opencast does: https://github.com/opencast/opencast/blob/develop/modules/engage-paella-player/src/main/paella-opencast/plugins/es.upv.paella.opencast.loader/03_oc_search_converter.js#L125

Rillke commented 3 years ago

We tested this today and it worked as expected.

TamaraGunkel commented 3 years ago

Thank you for the PR. That looks good!