-
Notifications
You must be signed in to change notification settings - Fork 3
VPVideoPlayer
DV Infosys edited this page Jun 24, 2019
·
1 revision
<com.dvinfosys.widgets.VideoPlayer.VPVideoPlayerStandard
android:layout_width="match_parent"
android:id="@+id/vp_videoplayer"
android:layout_height="250dp"/>
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
VPVideoPlayerStandard videoPlayerStandard = findViewById(R.id.vp_videoplayer);
videoPlayerStandard.setUp("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4",VPVideoPlayerStandard.SCREEN_LAYOUT_NORMAL,"Elephant Dream");
videoPlayerStandard.thumbImageView.setImageURI(Uri.parse("http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/images/ElephantsDream.jpg"));
}
@Override
public void onBackPressed() {
if (VPVideoPlayer.backPress()){
return;
}
super.onBackPressed();
}
@Override
protected void onPause() {
super.onPause();
VPVideoPlayer.releaseAllVideos();
}
Copyright (C) 2019 DV Infosys
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.