p2p-media-loader icon indicating copy to clipboard operation
p2p-media-loader copied to clipboard

Freeze in Smart TVs browsers

Open renatofrota opened this issue 4 years ago • 7 comments

Hello,

Using p2pml.hlsjs.Engine.isSupported() does not work in some Smart TV browsers I have tested (Samsung Tizen, LG, AOC, Philips, etc). The browser freezes when this line is reached. I had to create a separate page specifically for TVs, with regular player only (no-P2P).

Perhaps isSupported() method could be improved in this aspect, determining with more simple (non WebRTC related) commands if a browser is not capable of P2P due to the use of an old JS engine - before doing the WebRTC check itself?

renatofrota avatar Oct 22 '19 05:10 renatofrota

Can you check what exactly makes the browsers freeze? It doesn't call any browser functions but just checks if API actually exists:

public static isSupported(): boolean {
    const browserRtc = (getBrowserRTC as Function)();
    return (browserRtc && (browserRtc.RTCPeerConnection.prototype.createDataChannel !== undefined));
}
module.exports = function getBrowserRTC () {
  if (typeof window === 'undefined') return null
  var wrtc = {
    RTCPeerConnection: window.RTCPeerConnection || window.mozRTCPeerConnection ||
      window.webkitRTCPeerConnection,
    RTCSessionDescription: window.RTCSessionDescription ||
      window.mozRTCSessionDescription || window.webkitRTCSessionDescription,
    RTCIceCandidate: window.RTCIceCandidate || window.mozRTCIceCandidate ||
      window.webkitRTCIceCandidate
  }
  if (!wrtc.RTCPeerConnection) return null
  return wrtc
}

mrlika avatar Oct 22 '19 08:10 mrlika

Can you check what exactly makes the browsers freeze?

I have no idea about how to do this. These browsers do not have a console (not I am aware).

renatofrota avatar Oct 22 '19 17:10 renatofrota

A Panasonic TV's browser can't play live stream with p2p-media-loader 0.6.2(hls) but can play with 0.6.1(hls), Maybe ES2017 standard is not support with this tv browser!

Could you release p2p-media-loader with ES6(ES2015)? Thanks!

amtbnagios avatar Nov 28 '19 08:11 amtbnagios

Can you get the error message from the TV's browser console?

mrlika avatar Nov 29 '19 10:11 mrlika

I can't get error message on browser console, that tv is a customer's, I can't touch it!

amtbnagios avatar Dec 11 '19 03:12 amtbnagios

Me too. Only buffering on smart Tv.

ghost avatar Mar 15 '20 07:03 ghost

@renatofrota Would you be so kind as to provide example on how you solved HLS streaming on Tizen, webOS... without p2p?

inside83 avatar Feb 10 '21 03:02 inside83