videojs / videojs-vr

A plugin to add 360 and VR video support to video.js.
https://videojs-vr.netlify.com/
MIT License
539 stars 143 forks source link

Render nothing for stereo projection (360_LR/360TB) #155

Open ycw opened 5 years ago

ycw commented 5 years ago

Reproduce

Versions

Workaround

nickkraakman commented 5 years ago

Hi @ycw, I am having the exact same problem and was very happy when I found your issue and your workaround, but for some reason even with the workaround I still have a black screen for stereo video... So strange. You are certain those two lines are the only ones you changed?

Thanks for any help you can provide!

nickkraakman commented 5 years ago

Any news on this problem? We still have not been able to finish our videojs-vr integration, because nothing is rendering in stereo mode.

raviverma89 commented 5 years ago

Above solution worked it shows video after changing it to FrontSide

Sn0wFox commented 5 years ago

Probably late to the party, but in case someone want a fix that doesn't involve tweaking the plugin itself, here's what you can do, es6 style - but please read the edit underneath:

const vr = player.vr({projection:'360_TB'});  // Or '360_LR'

Object.defineProperty(vr, '_movieMaterial', {
  enumerable: true,
  writable: true,
});

Object.defineProperty(vr, 'movieMaterial', {
  get() {
    return this._movieMaterial;
  },
  set(value) {
    value.side = 0;
    this._movieMaterial = value;
  }
});

EDIT: the above solution worked in version 1.5.0. I recently updated the plugin to version 1.7.1 along with videojs 7.11.4 and it seems to now work as expected without the above, provided that you check these two issues and apply appropriate fixtures: