Skip to content
This repository was archived by the owner on Apr 12, 2024. It is now read-only.

Video stuck in cycle of buffering and replaying first second #33

@eric-purrington

Description

@eric-purrington

After pressing a video this error appears with a different string each time, after dismissing, video is stuck in a cycle trying to play. This seems similar to issue #8, but we're not getting 'null' and not using rn video controls.
Screenshot_20211011-132808_CLMBR Machine DEV

"react-native": "~0.62.2",
"mux-react-native-video-sdk": "https://github.com/muxinc/mux-stats-sdk-react-native-video#v0.1.0"
"react-native-video": "^5.1.0-alpha8",

Sample Code:

import Video from 'react-native-video';
import muxReactNativeVideo from 'mux-react-native-video-sdk';

const MuxVideo = muxReactNativeVideo(Video);

// render
<MuxVideo
  disableFocus={true}
  ref={playerRef}
  volume={instructorVolume}
  source={{
    uri: `https://stream.mux.com/${upload?.muxPlaybackId}.m3u8`,
    type: 'm3u8',
  }}
  resizeMode="cover"
  onEnd={onEnd}
  onError={(e) => {
    console.log('onVideoError', e);
    setVideoState('error');
  }}
  onLoad={(e) => {
    console.log('onLoad', e);
    setVideoState('loaded');
    setIsBuffering(false);
    setDuration(e.duration);
  }}
  onProgress={(progress) => {
    setProgress(progress);
  }}
  onBuffer={(e) => {
    console.log('onVideoBuffer', e);
    setVideoState('buffer');
    setIsBuffering(true);
  }}
  style={{
    flex: 1,
    backgroundColor: '#000',
  }}
  muxOptions={{
    application_name: app.name, 
    data: {
      env_key: envKey, 
      video_id: muxAssetId,
      video_title: 'Demo Video',
      player_software_version: '^5.1.0-alpha8'    
      player_name: 'React Native Player',  
    },
  }}
/>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions