Skip to content

Commit

Permalink
Fix UI TextDisplayer instantiation
Browse files Browse the repository at this point in the history
You can't use "new" with an arrow function, and the
TextDisplayerFactory is currently called with "new" (until #1521 is
resolved, and we stop using "new" with factories).

Change-Id: I365ff46dc59dcc0f9a751918567557b99366c950
  • Loading branch information
joeyparrish committed Feb 12, 2019
1 parent da5c399 commit d420b46
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ui/ui.js
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ shaka.ui.Overlay.createUI_ = function(container, video, config) {
// If the browser's native controls are disabled, use UI TextDisplayer.
if (!video.controls) {
player.configure('textDisplayFactory',
() => new shaka.ui.TextDisplayer(video, container));
function() { return new shaka.ui.TextDisplayer(video, container); });
}

container['ui'] = ui;
Expand Down

0 comments on commit d420b46

Please sign in to comment.