Skip to content

Commit 139bb7a

Browse files
committed
fix(UI): Allow play in VR in all compatible devices (#9297)
Since VR movement can be controlled with specific methods we should not limit its use
1 parent 3f21ecc commit 139bb7a

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

ui/vr_manager.js

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,6 @@
77

88
goog.provide('shaka.ui.VRManager');
99

10-
goog.require('shaka.device.DeviceFactory');
11-
goog.require('shaka.device.IDevice');
1210
goog.require('shaka.log');
1311
goog.require('shaka.ui.VRWebgl');
1412
goog.require('shaka.util.Dom');
@@ -392,16 +390,7 @@ shaka.ui.VRManager = class extends shaka.util.FakeEventTarget {
392390
* @private
393391
*/
394392
getGL_(canvas) {
395-
if (!canvas) {
396-
return null;
397-
}
398-
// The user interface is not intended for devices that are controlled with
399-
// a remote control, and WebGL may run slowly on these devices.
400-
const device = shaka.device.DeviceFactory.getDevice();
401-
const deviceType = device.getDeviceType();
402-
if (deviceType == shaka.device.IDevice.DeviceType.TV ||
403-
deviceType == shaka.device.IDevice.DeviceType.CONSOLE ||
404-
deviceType == shaka.device.IDevice.DeviceType.CAST) {
393+
if (!canvas || !window.WebGLRenderingContext) {
405394
return null;
406395
}
407396
const webglContexts = [

0 commit comments

Comments
 (0)