Skip to content

Conversation

hthetiot
Copy link
Contributor

@hthetiot hthetiot commented Jan 5, 2021

Testing

To test PeterXu/master branch

cordova plugin remove cordova-plugin-iosrtc --verbose
cordova plugin add https://github.com/cordova-rtc/cordova-plugin-iosrtc#PeterXu/master --verbose
cordova platform remove ios --no-save
cordova platform add ios --no-save

@hthetiot hthetiot changed the title PeterXu/master tests Merge Websocket to Canvas WebGL stream from PeterXu #620 Jan 6, 2021
@hthetiot hthetiot self-assigned this Jan 11, 2021
@hthetiot hthetiot added this to the 6.1.0 milestone Jan 13, 2021
@hthetiot hthetiot modified the milestones: 6.1.0, 6.1.x, 7.0.0, 6.2.0 Jan 20, 2021
@hthetiot
Copy link
Contributor Author

@PeterXu , I tested it and it works well, i added a fix to handle video tag without id.

Quick questions:

  • Can canvas render be disable, im not sure it should be default rendering yet.
  • I noticed the the canvas does not always attaptto the video tag position and size, can you handle that part also?

@PeterXu
Copy link

PeterXu commented Jan 26, 2021

@hthetiot

  • Yes, canvas can be disable (default enable in current code).
  • Ok, I will debug and tune the changing of size.

@hthetiot
Copy link
Contributor Author

Thank you @PeterXu , how do you disable canvas ?

@PeterXu
Copy link

PeterXu commented Jan 27, 2021

@hthetiot , It can be disabled by set hasCanvas to false in function MediaStreamRenderer.

diff.log

@hthetiot
Copy link
Contributor Author

@hthetiot , It can be disabled by set hasCanvas to false in function MediaStreamRenderer.

diff.log

Perfect, i will disable by default for now and allow to enable via config.xml

@hthetiot hthetiot modified the milestones: 6.2.0, triage Mar 1, 2021
@hthetiot hthetiot modified the milestones: triage, 8.0.x Mar 1, 2021
@hthetiot
Copy link
Contributor Author

Current build fail due following errors:

/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:60:8: error: value of optional type 'UIView?' must be unwrapped to refer to member 'backgroundColor' of wrapped base type 'UIView'
                self.elementView.backgroundColor = UIColor.black
                     ^
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:60:8: note: chain the optional using '?' to access member 'backgroundColor' only for non-'nil' base values
                self.elementView.backgroundColor = UIColor.black
                     ^
                                ?
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:60:8: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                self.elementView.backgroundColor = UIColor.black
                     ^
                                !
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:61:8: error: value of optional type 'UIView?' must be unwrapped to refer to member 'addSubview' of wrapped base type 'UIView'
                self.elementView.addSubview(self.videoView)
                     ^
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:61:8: note: chain the optional using '?' to access member 'addSubview' only for non-'nil' base values
                self.elementView.addSubview(self.videoView)
                     ^
                                ?
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:61:8: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                self.elementView.addSubview(self.videoView)
                     ^
                                !
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:61:36: error: value of optional type 'RTCEAGLVideoView?' must be unwrapped to a value of type 'RTCEAGLVideoView'
                self.elementView.addSubview(self.videoView)
                                                 ^
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:61:36: note: coalesce using '??' to provide a default when the optional value contains 'nil'
                self.elementView.addSubview(self.videoView)
                                                 ^
                                                           ?? <#default value#>
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:61:36: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                self.elementView.addSubview(self.videoView)
                                                 ^
                                                          !
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:62:8: error: value of optional type 'UIView?' must be unwrapped to refer to member 'layer' of wrapped base type 'UIView'
                self.elementView.layer.masksToBounds = true
                     ^
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:62:8: note: chain the optional using '?' to access member 'layer' only for non-'nil' base values
                self.elementView.layer.masksToBounds = true
                     ^
                                ?
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:62:8: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                self.elementView.layer.masksToBounds = true
                     ^
                                !
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:63:8: error: value of optional type 'UIView?' must be unwrapped to refer to member 'translatesAutoresizingMaskIntoConstraints' of wrapped base type 'UIView'
                self.elementView.translatesAutoresizingMaskIntoConstraints = false
                     ^
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:63:8: note: chain the optional using '?' to access member 'translatesAutoresizingMaskIntoConstraints' only for non-'nil' base values
                self.elementView.translatesAutoresizingMaskIntoConstraints = false
                     ^
                                ?
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:63:8: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                self.elementView.translatesAutoresizingMaskIntoConstraints = false
                     ^
                                !
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:66:27: error: use of local variable 'view' before its declaration
                self.webView.addSubview(view)
                                        ^
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:74:7: note: 'view' declared here
                let view = self.elementView;
                    ^
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:77:5: error: value of optional type 'UIView?' must be unwrapped to refer to member 'topAnchor' of wrapped base type 'UIView'
                                view.topAnchor.constraint(equalTo: guide.topAnchor).isActive = true
                                ^
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:77:5: note: chain the optional using '?' to access member 'topAnchor' only for non-'nil' base values
                                view.topAnchor.constraint(equalTo: guide.topAnchor).isActive = true
                                ^
                                    ?
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:77:5: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                                view.topAnchor.constraint(equalTo: guide.topAnchor).isActive = true
                                ^
                                    !
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:78:5: error: value of optional type 'UIView?' must be unwrapped to refer to member 'bottomAnchor' of wrapped base type 'UIView'
                                view.bottomAnchor.constraint(equalTo: guide.bottomAnchor).isActive = true
                                ^
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:78:5: note: chain the optional using '?' to access member 'bottomAnchor' only for non-'nil' base values
                                view.bottomAnchor.constraint(equalTo: guide.bottomAnchor).isActive = true
                                ^
                                    ?
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:78:5: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                                view.bottomAnchor.constraint(equalTo: guide.bottomAnchor).isActive = true
                                ^
                                    !
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:79:5: error: value of optional type 'UIView?' must be unwrapped to refer to member 'leftAnchor' of wrapped base type 'UIView'
                                view.leftAnchor.constraint(equalTo: guide.leftAnchor).isActive = true
                                ^
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:79:5: note: chain the optional using '?' to access member 'leftAnchor' only for non-'nil' base values
                                view.leftAnchor.constraint(equalTo: guide.leftAnchor).isActive = true
                                ^
                                    ?
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:79:5: note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
                                view.leftAnchor.constraint(equalTo: guide.leftAnchor).isActive = true
                                ^
                                    !
/Users/runner/work/cordova-plugin-iosrtc/myApp/platforms/ios/myApp/Plugins/cordova-plugin-iosrtc/PluginMediaStreamRenderer.swift:80:5: error: value of optional type 'UIView?' must be unwrapped to refer to member 'rightAnchor' of wrapped base type 'UIView'
                                view.rightAnchor.constraint(equalTo: guide.rightAnchor).isActive = true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants