개요
Android용 Brightcove Native SDK의 이전 버전에서는int그리고Integer데이터 유형은 재생 헤드 위치(탐색 위치 포함) 및 비디오 길이에 대한 값을 처리하는 데 사용되었습니다.
Android용 네이티브 SDK 버전 6.18.0에서는 이러한 값을 처리하기 위한ExoPlayer라이브러리를 조정했습니다. Native SDK는 사용int및Integer데이터 유형에서 및 데이터 유형으로 마이그레이션되었습니다. longLong
지원 중단 및 교체
이 마이그레이션에는 두 가지 프로세스가 포함됩니다.
- 클래스 멤버 및 메서드에서 모두
int및Integer플레이헤드 위치 및 지속 시간 값 참조의 지원 중단 - 이름에
Long접미사가 있는 새 클래스 멤버 및 메서드 생성
예
다음은 이러한 지원 중단 및 대체에 대한 몇 가지 예입니다.
에서ExoPlayerVideoDisplayComponent :
- 지원 중단됨:
videoDisplayComponent.getLiveEdge() - 신규:
videoDisplayComponent.getLiveEdgeLong()
Video수업 중:
- 지원 중단됨:
video.getDuration() - 신규:
video.getDurationLong()
요구 사항
이 기능에는 다음 요구 사항이 필요합니다.
- Android 6.18.0 이상용 Brightcove 네이티브 SDK
새 데이터 유형 사용
Android용 Brightcove Native SDK는 여전히 정수 유형의 사용을 지원하지만 이러한 유형의 대체는 새 릴리스의 중단점을 표시합니다. 따라서 앞으로 프로젝트에서 이러한 교체를 구현하는 것이 좋습니다.
예
다음은 새 멤버 및 메서드의 몇 가지 예입니다.
재생 헤드 위치 및 비디오 재생 시간 듣기
Map<String, Object> properties = new HashMap<>();
properties.put(Event.PLAYHEAD_POSITION_LONG, exoPlayer.getCurrentPosition());
properties.put(Event.VIDEO, getCurrentVideo());
eventEmitter.emit(EventType.DID_STOP, properties);
현재 플레이헤드 위치 가져오기
long position = event.getLongProperty(Event.PLAYHEAD_POSITION_LONG);
또는
long position = brightcoveVideoView.getVideoDisplay().getPlayerCurrentPosition();
동영상 재생 시간 가져오기
long duration = videoView.getVideoDisplay().getCurrentVideo().getDurationLong();
또는
long duration = event.getLongProperty(Event.VIDEO_DURATION_LONG);
사용되지 않는 클래스 및 메서드
다음 클래스 멤버 및 메서드는 이제 사용되지 않습니다.
AbstractEvent수업
PLAYHEAD_POSITIONPROGRESS_BAR_PLAYHEAD_POSITIONORIGINAL_PLAYHEAD_POSITIONVIDEO_DURATIONSEEK_DEFAULTSEEK_POSITIONSEEK_PROGRESSFROM_SEEK_POSITIONRESTORE_SEEK_POSITIONORIGINAL_SEEK_POSITIONMIN_POSITIONMAX_POSITIONLIVE_WINDOW_DURATIONSTART_TIMEEND_TIME
BaseVideoView수업
durationplayheadPositiongetDuration()getCurrentPosition()seekTo(int position)
VideoDisplayComponent수업
playheadPositiongetLiveEdge()
ExoPlayerVideoDisplayComponent수업
getLiveEdge()
GooglecastComponent수업
CAST_MEDIA_PLAY_POSITION
GoogleIMAComponent수업
setAdPosition(int position)getContentPosition()setContentPosition(int position)
OmnitureComponent수업
play(Integer position)play(Integer position, boolean shouldIgnoreState)stopPlayback(Integer position)stopPlayback(Integer position, boolean shouldIgnoreState)
BrightcoveClosedCaption수업
Brightcove(int beginTime, int endTime, List<List<Span>> testLines)Brightcove(int beginTime, int endTime, String caption)getTimeRange()
TTMLParser수업
parseTimeValue(String value)
BrightcoveMediaController수업
getSeekBarOffset()
BrightcoveSeekBarController수업
getSeekBarOffset()setSeekBarOffset(int offset)
MediaControllerConfig수업
setInitialDuration(int initialDuration)setInitialPlayheadPosition(int initialPlayheadPosition)getInitialDuration()getInitialPlayheadPosition()
SeekButtonController수업
seekDefaultseekStartPositionseekTargetPositiongetSeekDefault()setSeekDefault()computeTargetSeekPosition()
Block수업
beginTimeendTimegetBeginTime()setBeginTime(Integer beginTime)getEndTime()setEndTime(Integer endTime)
CuePoint수업
CuePointType(int position, String type, Map<String, Object> properties)CuePointType(int position, CuePointType type, Map<String, Object>)getPosition()
Video수업
getDuration()
Video.Field수업
duration
BrightcoveClosedCaptioningView수업
TreeMap<Integer, ArrayList<TimeMapEntry>> captionsPerSecondMapSparseArray<StringBuilder> currentCaptionBlockArrayint lastProgressTimefindCaptionsForPosition(int position)refreshCaptions(int seekToTime)