Skip to main content

URL Playback

You can play videos in Lura Player with HLS, Dash or mp4 URL.

AttributeTypeRequiredDescription
urlstringYesHLS, Dash or mp4 URL of the video
format"hls", "dash" or "mp4"NoPlay format of the video. Sometimes, the play URL does not contain data about whether the video is HLS or DASH. In this case, the format attribute is used.
import React, { useRef } from "react";
import { LuraPlayer, LuraPlayerProps } from "lura-react-native-core";

export default function MySampleComponent() {
const playerRef = useRef<LuraPlayer>(null);

const config = {
url: "https://example.com/master.m3u8",
format: "hls",
};

return (
<View>
<LuraPlayer ref={playerRef} config={config} />
</View>
);
}