Implementation with React
🚨
RsiInterpretationPlayer
must be imported beforersiSubtitles
.RsiSubtitles
cannot work without the widgetRsinterpretationPlayer
🚨 In order to use the
widget subtitles
you must add as parameter ofRsiInterpretationPlayer
hasSubtitles
to betrue
.
import React from 'react';
import { RsiInterpretationPlayer, RsiSubtitles } from '@akkadu/rsi-react'
export default class ComponentInterpretationPlayer {
const handleOnSubtitlesReady = (e) => {
console.info('receive onReady event for the subtitles widget: ',e );
}
render() {
return (
<div>
<RsiInterpretationPlayer
sdkKey="sdk_key_XXXX"
roomName="your_room_name"
hasSubtitles={true}
onReady={handleOnReady}
onLanguageSelected={handleOnLanguageSelected}
onConnectionStatusUpdated={handleOnConnectionStatusUpdated}
/>
<RsiSubtitles
sdkKey="sdk_key_XXXX"
roomName="your_room_name"
onReady={handleOnSubtitlesReady}
/>
</div>
);
}
}