Skip to content

Commit 5078f92

Browse files
skysky
authored andcommitted
remove baidu player module for android
1 parent 0164adc commit 5078f92

30 files changed

+1
-50
lines changed

android/build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ repositories {
4242
dependencies {
4343
compile files('libs/vod_upload_with_bos.jar')
4444
compile files('libs/agent_lss-4.3.0-20171222.071535-1.jar')
45-
compile files('libs/bdplayer.jar')
4645
compile 'com.facebook.react:react-native:+'
4746
compile 'com.squareup.okhttp3:okhttp:3.4.1'
4847
}

android/libs/bdplayer.jar

-72 KB
Binary file not shown.

android/src/main/AndroidManifest.xml

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,5 @@
1313
android:label="@string/app_name"
1414
android:supportsRtl="true"
1515
android:theme="@style/AppTheme">
16-
<activity
17-
android:name="com.reactnative.baiducloud.videoplayer.SimplePlayActivity"
18-
android:configChanges="orientation|keyboardHidden|screenSize"
19-
android:label="@string/app_name"
20-
android:theme="@android:style/Theme.NoTitleBar">
21-
22-
</activity>
23-
<activity
24-
android:name="com.reactnative.baiducloud.videoplayer.AdvancedPlayActivity"
25-
android:configChanges="orientation|keyboardHidden|screenSize"
26-
android:label="@string/app_name"
27-
android:theme="@android:style/Theme.NoTitleBar">
28-
29-
</activity>
3016
</application>
3117
</manifest>

android/src/main/java/com/reactnative/baibubce/RNBaiduBceModule.java

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -33,9 +33,6 @@
3333
import com.facebook.react.modules.core.DeviceEventManagerModule;
3434
import com.reactnative.baibubce.FileUploadSession;
3535
import com.reactnative.baibubce.Utils;
36-
import com.reactnative.baiducloud.videoplayer.AdvancedPlayActivity;
37-
import com.reactnative.baiducloud.videoplayer.SimplePlayActivity;
38-
import com.reactnative.baiducloud.videoplayer.info.VideoInfo;
3936

4037
import java.io.File;
4138
import java.io.FileNotFoundException;
@@ -218,37 +215,6 @@ public void queryMediaInfo(final String mediaId, final Promise promise) {
218215
promise.reject("400","error");
219216
}
220217
}
221-
@ReactMethod
222-
public void playVideo(final String mediaId, final Promise promise){
223-
GetMediaResourceResponse response = vodClient.getMediaResource(uploadedMediaId);
224-
String title = response.getAttributes().getTitle();
225-
String url = response.getPlayableUrlList().get(0).getUrl();
226-
String status = response.getStatus();
227-
if(status.equals("RUNNING")){
228-
promise.reject("400", "转码中");
229-
}else if(status.equals("PUBLISHED")){
230-
promise.resolve("已发布");
231-
VideoInfo info = new VideoInfo(title, url);
232-
Intent intent = null;
233-
// SimplePlayActivity简易播放窗口,便于快速了解播放流程
234-
intent = new Intent(getReactApplicationContext(), SimplePlayActivity.class);
235-
// AdvancedPlayActivity高级播放窗口,内含丰富的播放控制逻辑
236-
//intent = new Intent(getReactApplicationContext(), AdvancedPlayActivity.class);
237-
intent.putExtra("videoInfo", info);
238-
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
239-
getReactApplicationContext().startActivity(intent);
240-
}else if(status.equals("FAILED")){
241-
promise.reject("400", "转码失败");
242-
}else if(status.equals("PROCESSING")){
243-
promise.reject("400", "内部处理中");
244-
}else if(status.equals("DISABLED")){
245-
promise.reject("400", "已停用");
246-
}else if(status.equals("BANNED")){
247-
promise.reject("400", "已屏蔽");
248-
}else{
249-
promise.reject("400", "未知错误");
250-
}
251-
}
252218
/**
253219
* Get a file path from a Uri. This will get the the path for Storage Access
254220
* Framework Documents, as well as the _data field for the MediaStore and
-9.94 MB
Binary file not shown.
-53.7 KB
Binary file not shown.
-17.6 KB
Binary file not shown.
-2.64 MB
Binary file not shown.
-578 KB
Binary file not shown.
-8.11 MB
Binary file not shown.

0 commit comments

Comments
 (0)