Skip to content

Commit

Permalink
Fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
armands-malejevs committed May 18, 2023
1 parent 9f8e4d5 commit 7cdd1f0
Showing 1 changed file with 14 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@

import com.mux.stats.sdk.muxstats.MuxErrorException;
import com.mux.stats.sdk.muxstats.MuxStatsSdkMedia3;
import com.mux.stats.sdk.muxstats.MuxStatsExoPlayer;
// End Mux

import java.io.IOException;
Expand Down Expand Up @@ -202,7 +203,7 @@ public class ReactExoplayerView extends FrameLayout implements
private Timeline playerTimeline;

private DataSource.Factory mediaDataSourceFactory;
private ExoPlayer player;
private MuxStatsExoPlayer player;
private DefaultTrackSelector trackSelector;
private boolean playerNeedsSource;

Expand Down Expand Up @@ -959,19 +960,25 @@ private void initializeMuxData(ReactExoplayerView self) {
CustomerPlayerData customerPlayerData = new CustomerPlayerData();
customerPlayerData.setPlayerName(self.muxOptions.getString("player_name"));
customerPlayerData.setPlayerVersion(self.muxOptions.getString("player_version"));
customerPlayerData.setPlayerInitTime(self.muxOptions.getInt("player_init_time"));
if (self.muxOptions.getString("player_init_time") != null) {
Long initTime = Long.parseLong(self.muxOptions.getString("player_init_time"));
customerPlayerData.setPlayerInitTime(initTime);
}

// Video data
CustomerVideoData customerVideoData = new CustomerVideoData();
customerVideoData.setVideoTitle(self.muxOptions.getString("video_title"));
customerVideoData.setVideoId(self.muxOptions.getString("video_id"));
customerVideoData.setVideoDrmType(self.muxOptions.getString("video_drm_type"));
// customerVideoData.setVideoDrmType(self.muxOptions.getString("video_drm_type"));
customerVideoData.setVideoSeries(self.muxOptions.getString("video_series"));
customerVideoData.setVideoDuration(self.muxOptions.getString("video_duration"));
if (self.muxOptions.getString("video_duration") != null) {
Long videoDuration = Long.parseLong(self.muxOptions.getString("video_duration"));
customerVideoData.setVideoDuration(videoDuration);
}
customerVideoData.setVideoStreamType(self.muxOptions.getString("video_stream_type"));
customerVideoData.setVideoCdn(self.muxOptions.getString("video_cdn"));
customerVideoData.setExperimentName(self.muxOptions.getString("experiment_name"));
customerVideoData.setSubPropertyId(self.muxOptions.getString("sub_property_id"));
// customerVideoData.setExperimentName(self.muxOptions.getString("experiment_name"));
// customerVideoData.setSubPropertyId(self.muxOptions.getString("sub_property_id"));

if (self.srcUri != null) {
customerVideoData.setVideoSourceUrl(self.srcUri.toString());
Expand All @@ -983,7 +990,7 @@ private void initializeMuxData(ReactExoplayerView self) {

// Viewer data
CustomerViewerData customerViewerData = new CustomerViewerData();
customerViewerData.setViewerUserId(self.muxOptions.getString("viewer_user_id"));
customerViewerData.setUserId(self.muxOptions.getString("viewer_user_id"));

// Custom data
CustomData customData = new CustomData();
Expand Down

0 comments on commit 7cdd1f0

Please sign in to comment.