mirror of
https://github.com/streamwall/streamwall.git
synced 2026-01-31 01:12:48 -05:00
Set bounds after adding BrowserView
Otherwise apparently the view won't display.
This commit is contained in:
@@ -100,18 +100,17 @@ export default class StreamWindow extends EventEmitter {
|
|||||||
this.viewActions = {
|
this.viewActions = {
|
||||||
offscreenView: (context, event) => {
|
offscreenView: (context, event) => {
|
||||||
const { view } = context
|
const { view } = context
|
||||||
view.setBounds({ x: 0, y: 0, width, height })
|
|
||||||
// It appears necessary to initialize the browser view by adding it to a window and setting bounds. Otherwise, some streaming sites like Periscope will not load their videos due to RAFs not firing.
|
// It appears necessary to initialize the browser view by adding it to a window and setting bounds. Otherwise, some streaming sites like Periscope will not load their videos due to RAFs not firing.
|
||||||
win.removeBrowserView(view)
|
win.removeBrowserView(view)
|
||||||
offscreenWin.addBrowserView(view)
|
offscreenWin.addBrowserView(view)
|
||||||
|
view.setBounds({ x: 0, y: 0, width, height })
|
||||||
},
|
},
|
||||||
positionView: (context, event) => {
|
positionView: (context, event) => {
|
||||||
const { pos, view } = context
|
const { pos, view } = context
|
||||||
|
|
||||||
view.setBounds(pos)
|
|
||||||
|
|
||||||
offscreenWin.removeBrowserView(view)
|
offscreenWin.removeBrowserView(view)
|
||||||
win.addBrowserView(view)
|
win.addBrowserView(view)
|
||||||
|
view.setBounds(pos)
|
||||||
|
|
||||||
// It's necessary to remove and re-add the overlay view to ensure it's on top.
|
// It's necessary to remove and re-add the overlay view to ensure it's on top.
|
||||||
win.removeBrowserView(overlayView)
|
win.removeBrowserView(overlayView)
|
||||||
|
|||||||
Reference in New Issue
Block a user