Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does this work with renative ? #6

Open
redgoalsuk opened this issue Apr 24, 2020 · 2 comments
Open

Does this work with renative ? #6

redgoalsuk opened this issue Apr 24, 2020 · 2 comments

Comments

@redgoalsuk
Copy link

redgoalsuk commented Apr 24, 2020

Hi

I am trying to get a player that will work with renative https://github.com/pavjacko/renative

I cam across this player and tried to run the sample code but it did not play on a Samsung Tizen TV 2016 - I just get a blank page, it works fine when I play it on the desktop with no errors in the js console.

Any ideas what I may be doing wrong here or is this player not intended for native applications?

import React, { Component } from "react";
import ReactDOM from 'react-dom';
import ShakaPlayer from 'shaka-player-react';

const STREAMS = [
  {
    name: 'Angel One MPEG-DASH',
    src: 'https://storage.googleapis.com/shaka-demo-assets/angel-one/dash.mpd',
  },
  {
    name: 'Big Buck Bunny HLS',
    src:
      'https://storage.googleapis.com/shaka-demo-assets/bbb-dark-truths-hls/hls.m3u8',
  },
];

function App() {
  const [show, setShow] = React.useState(false);

  function onToggle() {
    setShow(!show);
  }

  const [src, setSrc] = React.useState(STREAMS[0].src);

  function onSelectSrc(event) {
    setSrc(event.target.value);
  }

  return (
    <div>
      <div>
        <button onClick={onToggle}>{show ? 'Hide' : 'Show'}</button>
      </div>
      <div>
        <select value={src} onChange={onSelectSrc}>
          {STREAMS.map(stream => (
            <option value={stream.src}>{stream.name}</option>
          ))}
        </select>
      </div>
      {show && <ShakaPlayer autoPlay src={src} />}
    </div>
  );
}
export default App;

@matvp91
Copy link
Owner

matvp91 commented Apr 24, 2020

Would you mind attaching a debugger to Tizen to figure out if either Shaka or the React wrapper throws an error? I'd like to figure out if this could be an issue in the React wrapper or in shaka-player itself. As far as I know, support for Tizen 2016 is untested by the shaka team but could theoretically work.

@bruno-sartori
Copy link

Someone knows more about this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants