diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer.gif" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer.gif" new file mode 100644 index 0000000000000000000000000000000000000000..a9f09ff59caa430cd437d6f2447a9cf1294fe929 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer.gif" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.gitignore" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..fdc0c4a65db238be4186f16e1e0911b1d61fbf31 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.gitignore" @@ -0,0 +1,16 @@ +*.iml +.gradle +/local.properties +/.idea/caches +/.idea/libraries +/.idea/modules.xml +/.idea/workspace.xml +/.idea/navEditor.xml +/.idea/assetWizardSettings.xml +.DS_Store +/build +/captures +.externalNativeBuild +/entry/.preview +.cxx +/node_modules diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/.gitignore" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..26d33521af10bcc7fd8cea344038eaaeb78d0ef5 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/.gitignore" @@ -0,0 +1,3 @@ +# Default ignored files +/shelf/ +/workspace.xml diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/compiler.xml" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/compiler.xml" new file mode 100644 index 0000000000000000000000000000000000000000..fb7f4a8a465d42b4a0390d464b83b99e8465bba7 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/compiler.xml" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/gradle.xml" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/gradle.xml" new file mode 100644 index 0000000000000000000000000000000000000000..3e1e57f0f42c0f3110cf4edea151ab387ac9788e --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/gradle.xml" @@ -0,0 +1,23 @@ + + + + + + + \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/jarRepositories.xml" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/jarRepositories.xml" new file mode 100644 index 0000000000000000000000000000000000000000..19e238eaa31f512cfc1e8641964227098d1eb8bb --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/jarRepositories.xml" @@ -0,0 +1,25 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/misc.xml" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/misc.xml" new file mode 100644 index 0000000000000000000000000000000000000000..794aa67e635837ac492499857a20ce72f4938e28 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/misc.xml" @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/phone/phoneSettingConfig_MateX2.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/phone/phoneSettingConfig_MateX2.json" new file mode 100644 index 0000000000000000000000000000000000000000..f505e6b9ca3d41faf1f0a39a496db58b117fbd60 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/phone/phoneSettingConfig_MateX2.json" @@ -0,0 +1,25 @@ +{ + "setting": { + "1.0.1": { + "Language": { + "args": { + "Language": "zh-CN" + } + } + } + }, + "frontend": { + "1.0.0": { + "Resolution": { + "args": { + "Resolution": "360*780" + } + }, + "DeviceType": { + "args": { + "DeviceType": "phone" + } + } + } + } +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/phone/phoneSettingConfig_P40.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/phone/phoneSettingConfig_P40.json" new file mode 100644 index 0000000000000000000000000000000000000000..69beee7fd7694e767677c5d3b4863f419c2bf84e --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/phone/phoneSettingConfig_P40.json" @@ -0,0 +1,25 @@ +{ + "setting": { + "1.0.1": { + "Language": { + "args": { + "Language": "zh_CN" + } + } + } + }, + "frontend": { + "1.0.0": { + "Resolution": { + "args": { + "Resolution": "360*780" + } + }, + "DeviceType": { + "args": { + "DeviceType": "phone" + } + } + } + } +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/previewConfigV2.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/previewConfigV2.json" new file mode 100644 index 0000000000000000000000000000000000000000..cbf6a70cda935775f5375f0b6dd1b144ebcec32c --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/previewConfigV2.json" @@ -0,0 +1,49 @@ +{ + "1.0.0": { + "LastPreviewDevice": {} + }, + "1.0.1": { + "profileList": [ + { + "id": "P40", + "deviceType": "phone", + "width": 1080, + "height": 2340, + "shape": "rect", + "dpi": 480, + "orientation": "portrait", + "language": "zh_CN", + "colorMode": "light" + }, + { + "id": "MateX2", + "deviceType": "phone", + "width": 2200, + "height": 2480, + "shape": "rect", + "dpi": 520, + "orientation": "portrait", + "language": "zh_CN", + "colorMode": "light" + }, + { + "id": "TV", + "deviceType": "tv", + "width": 1920, + "height": 1080, + "shape": "rect", + "dpi": 320, + "orientation": "landscape", + "language": "zh_CN", + "colorMode": "light" + } + ], + "runningProfileList": [ + "P40" + ], + "availableProfileList": [ + "MateX2", + "TV" + ] + } +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/tv/tvSettingConfig_TV.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/tv/tvSettingConfig_TV.json" new file mode 100644 index 0000000000000000000000000000000000000000..735b7846e511202d22504a70bf2c92d8f7aba460 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/previewer/tv/tvSettingConfig_TV.json" @@ -0,0 +1,25 @@ +{ + "setting": { + "1.0.1": { + "Language": { + "args": { + "Language": "zh-CN" + } + } + } + }, + "frontend": { + "1.0.0": { + "Resolution": { + "args": { + "Resolution": "960*540" + } + }, + "DeviceType": { + "args": { + "DeviceType": "tv" + } + } + } + } +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/superAppModuleSettings.xml" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/superAppModuleSettings.xml" new file mode 100644 index 0000000000000000000000000000000000000000..d8d255f166b93af6d0a97cc799d6c1a84dacfcda --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/superAppModuleSettings.xml" @@ -0,0 +1,19 @@ + + + + + + + true + entry + + + + + true + entry + + + + + \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/vcs.xml" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/vcs.xml" new file mode 100644 index 0000000000000000000000000000000000000000..b2bdec2d71b6a5ce4ae49efc37516809c50e4d5e --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/.idea/vcs.xml" @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/build.gradle" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/build.gradle" new file mode 100644 index 0000000000000000000000000000000000000000..7b262c269082b0d379749be22b21102d60415736 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/build.gradle" @@ -0,0 +1,33 @@ +// Top-level build file where you can add configuration options common to all sub-projects/modules. +apply plugin: 'com.huawei.ohos.app' + +//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510 +ohos { + compileSdkVersion 6 +} + +buildscript { + repositories { + maven { + url 'https://repo.huaweicloud.com/repository/maven/' + } + maven { + url 'https://developer.huawei.com/repo/' + } + } + dependencies { + classpath 'com.huawei.ohos:hap:3.0.3.2' + classpath 'com.huawei.ohos:decctest:1.2.6.0' + } +} + +allprojects { + repositories { + maven { + url 'https://repo.huaweicloud.com/repository/maven/' + } + maven { + url 'https://developer.huawei.com/repo/' + } + } +} diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/.gitignore" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/.gitignore" new file mode 100644 index 0000000000000000000000000000000000000000..7d5b7a94f4dcf381f03ff21f28f8a2494b58023f --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/.gitignore" @@ -0,0 +1,2 @@ +/build +/node_modules diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/build.gradle" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/build.gradle" new file mode 100644 index 0000000000000000000000000000000000000000..d493119fbb4586dac82d271dc9979d92c585f21b --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/build.gradle" @@ -0,0 +1,26 @@ +apply plugin: 'com.huawei.ohos.hap' +apply plugin: 'com.huawei.ohos.decctest' +//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510 +ohos { + compileSdkVersion 6 + defaultConfig { + compatibleSdkVersion 6 + } + buildTypes { + release { + proguardOpt { + proguardEnabled false + rulesFiles 'proguard-rules.pro' + } + } + } +} + +dependencies { + implementation fileTree(dir: 'libs', include: ['*.jar', '*.har']) + testImplementation 'junit:junit:4.13.1' + ohosTestImplementation 'com.huawei.ohos.testkit:runner:1.0.0.200' +} +decc { + supportType = ['html','xml'] +} diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/package.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/package.json" new file mode 100644 index 0000000000000000000000000000000000000000..0967ef424bce6791893e9a57bb952f80fd536e93 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/package.json" @@ -0,0 +1 @@ +{} diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/proguard-rules.pro" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/proguard-rules.pro" new file mode 100644 index 0000000000000000000000000000000000000000..f7666e47561d514b2a76d5a7dfbb43ede86da92a --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/proguard-rules.pro" @@ -0,0 +1 @@ +# config module specific ProGuard rules here. \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/config.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/config.json" new file mode 100644 index 0000000000000000000000000000000000000000..51814038d004dfed4365562154e8f66d57aa0ae6 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/config.json" @@ -0,0 +1,64 @@ +{ + "app": { + "bundleName": "com.liangzili.jsvideoplayer", + "vendor": "liangzili", + "version": { + "code": 1000000, + "name": "1.0.0" + } + }, + "deviceConfig": {}, + "module": { + "reqPermissions": [ + { + "name": "ohos.permission.DISTRIBUTED_DATASYNC" + } + ], + "package": "com.liangzili.jsvideoplayer", + "name": ".MyApplication", + "mainAbility": "com.liangzili.jsvideoplayer.MainAbility", + "deviceType": [ + "phone", + "tv" + ], + "distro": { + "deliveryWithInstall": true, + "moduleName": "entry", + "moduleType": "entry", + "installationFree": true + }, + "abilities": [ + { + "skills": [ + { + "entities": [ + "entity.system.home" + ], + "actions": [ + "action.system.home" + ] + } + ], + "visible": true, + "name": "com.liangzili.jsvideoplayer.MainAbility", + "icon": "$media:icon", + "description": "$string:mainability_description", + "label": "$string:entry_MainAbility", + "type": "page", + "launchType": "standard" + } + ], + "js": [ + { + "pages": [ + "pages/index/index" + ], + "name": "default", + "window": { + "designWidth": 720, + "autoDesignWidth": true + } + } + ] + } +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/java/com/liangzili/jsvideoplayer/MainAbility.java" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/java/com/liangzili/jsvideoplayer/MainAbility.java" new file mode 100644 index 0000000000000000000000000000000000000000..6cf5e72f3b1efe7b28982557bb1e348b59621b06 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/java/com/liangzili/jsvideoplayer/MainAbility.java" @@ -0,0 +1,18 @@ +package com.liangzili.jsvideoplayer; + +import ohos.ace.ability.AceAbility; +import ohos.aafwk.content.Intent; + +public class MainAbility extends AceAbility { + @Override + public void onStart(Intent intent) { + super.onStart(intent); + // 获取分布式权限 + requestPermissionsFromUser(new String[]{"ohos.permission.DISTRIBUTED_DATASYNC"}, 0); + } + + @Override + public void onStop() { + super.onStop(); + } +} diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/java/com/liangzili/jsvideoplayer/MyApplication.java" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/java/com/liangzili/jsvideoplayer/MyApplication.java" new file mode 100644 index 0000000000000000000000000000000000000000..128e14ea5fddf45c6835a12a7ec2944806273b9e --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/java/com/liangzili/jsvideoplayer/MyApplication.java" @@ -0,0 +1,10 @@ +package com.liangzili.jsvideoplayer; + +import ohos.aafwk.ability.AbilityPackage; + +public class MyApplication extends AbilityPackage { + @Override + public void onInitialize() { + super.onInitialize(); + } +} diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/app.js" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/app.js" new file mode 100644 index 0000000000000000000000000000000000000000..aedcefe0054c6e16c40491f4d1abc20a4dc1c6ef --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/app.js" @@ -0,0 +1,8 @@ +export default { + onCreate() { + console.info('AceApplication onCreate'); + }, + onDestroy() { + console.info('AceApplication onDestroy'); + } +}; diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/000.jpg" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/000.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..4d1def106939e76a68f55e0989ae81e1de801d18 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/000.jpg" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/001.jpg" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/001.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..626a0711387b980f38c90ee83d93aade378ac567 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/001.jpg" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/002.gif" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/002.gif" new file mode 100644 index 0000000000000000000000000000000000000000..602f18ef427f5a31bb24c9739a007a31d9bc53f7 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/002.gif" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/003.jpg" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/003.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..270234fcbcab5de9cca8acd1f1f279f5db611170 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/003.jpg" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/004.jpg" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/004.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..9ac36680bfb863074ccba40163c330c38d44a215 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/004.jpg" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/005.png" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/005.png" new file mode 100644 index 0000000000000000000000000000000000000000..8afdc074625c88a5721ad9b7fd0ffb616e0deac8 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/005.png" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/Wallpaper.png" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/Wallpaper.png" new file mode 100644 index 0000000000000000000000000000000000000000..60d4841a80eb20c63de74306cb7f8350d6a85c48 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/Wallpaper.png" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/bg-tv.jpg" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/bg-tv.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..86fc07358eea5c1474bc833fca07c6d4d8698a89 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/bg-tv.jpg" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/ic_transfer.png" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/ic_transfer.png" new file mode 100644 index 0000000000000000000000000000000000000000..b46fa97d72a99367811338994b063073ce66ad59 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/images/ic_transfer.png" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/video/huawei-watch-gt2-pro-video.mp4" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/video/huawei-watch-gt2-pro-video.mp4" new file mode 100644 index 0000000000000000000000000000000000000000..d180cc56a04931792846e5dbdde57691f03a9e7e Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/video/huawei-watch-gt2-pro-video.mp4" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/video/mate40-pv.mp4" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/video/mate40-pv.mp4" new file mode 100644 index 0000000000000000000000000000000000000000..63b82908c67f0896f7e15da2d28c5bffbfc45fa4 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/common/video/mate40-pv.mp4" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/i18n/en-US.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/i18n/en-US.json" new file mode 100644 index 0000000000000000000000000000000000000000..e63c70d978a3a53be988388c87182f81785e170c --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/i18n/en-US.json" @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + } +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/i18n/zh-CN.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/i18n/zh-CN.json" new file mode 100644 index 0000000000000000000000000000000000000000..de6ee5748322f44942c1b003319d8e66c837675f --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/i18n/zh-CN.json" @@ -0,0 +1,6 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + } +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/pages/index/index.css" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/pages/index/index.css" new file mode 100644 index 0000000000000000000000000000000000000000..c4ead1332b2d6561ac3d743ef9bf092adb5e6706 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/pages/index/index.css" @@ -0,0 +1,137 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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. + */ +.container { + flex-direction: column; + background-color: #ffffff; + width: 100%; + height: 100%; +} + +.swiper { + flex-direction: column; +} + +.video-block { + width: 100%; + height: 40%; + justify-content: center; + align-items: center; +} + +.video-stack { + flex-direction: column; + align-items: flex-end; +} + +video { + width: 100%; + height: 100%; +} + +.transfer { + margin: 12px; + width: 30px; + height: 30px; +} + +.divhotcommet { + flex-direction: column; +} + +.hotcommet { + margin: 5px; + font-size: 20px; +} + +.comment { + margin: 12px; + width: 100%; + height: 100%; + + margin-bottom: 15px; + flex-direction: column; + justify-content: flex-end; + flex-shrink:0; +} + +.list-item { +} + +.name { + flex-direction: column; +} + +.image_src { + width: 35px; + height: 35px; + border-radius: 28px; + justify-content: flex-start; + align-items: flex-end; + margin: 6px; + background-color: #FFFFFF; +} + +.inputButton { + width: 100%; + height: 20%; +} + +.button { + margin: 5px; + width: 20%; + height: 45%; +} + +.dialog-main { + width: 98%; +} + +.dialog-div { + flex-direction: column; + align-items: center; +} + +.inner-txt { + width: 98%; + margin-top: 20px; + flex-direction: column; + align-items: center; + justify-content: space-around; +} + +.txt { + margin: 6px; + font-size: 15px; +} + +.txtComment { + margin: 12px; + font-size: 20px; + max-lines:2; + text-overflow: ellipsis; +} + +.inner-btn { + width: 98%; + justify-content: space-around; + align-items: center; + margin-top: 20px; + margin-bottom: 20px; +} + +#timeDialog .dialog-div .inner-txt { + margin-top: 20px; + margin-bottom: 20px; +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/pages/index/index.hml" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/pages/index/index.hml" new file mode 100644 index 0000000000000000000000000000000000000000..9f8f4ea613205a95e227320cd376de0fd9766edf --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/pages/index/index.hml" @@ -0,0 +1,79 @@ + +
+ +
+
+ + + + +
+
+ 热门评论 +
+ + + +
+ {{$item.name}} + {{$item.date}} + {{$item.commend}} +
+ +
+
+
+ + +
+
+
+
+ +
+ + + + + +
+
+ 视频播放完成,是否重新播放? +
+
+ + +
+
+
+
diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/pages/index/index.js" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/pages/index/index.js" new file mode 100644 index 0000000000000000000000000000000000000000..7f8e7a23533e6785e431a660a57ed23692e8435e --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/js/default/pages/index/index.js" @@ -0,0 +1,197 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * 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. + */ +import prompt from '@system.prompt'; + +export default { + data: { + autoplay: false, // 是否自动播放 + videoId: 'video', // 播放器id + url: '/common/video/s1.mp4', // 视频地址 + posterUrl: '/common/images/bg-tv.jpg', // 视频预览的海报路径 + controlShow: true, // 是否显示控制栏 + loop: true, // 是否循环播放 + startTime: 10, // 播放开始时间 + speed: 0.2, // 播放速度 + isfullscreenchange: false, // 是否全屏 + input:'', // 获取输入框的内容 + dataList:[ + { + url: '/common/video/huawei-watch-gt2-pro-video.mp4', + comments:[ + { + src:'/common/images/001.jpg', + name:'哈莫呢哦艾斯', + date:'10-9', + commend:'第二期不错,赶快冲一波~', + }, + { + src:'/common/images/002.gif', + name:'137******82', + date:'10-9', + commend:'支持支持!!!!!!!!', + }, + { + src:'/common/images/003.jpg', + name:'FIEforever', + date:'10-9', + commend:'严重支持一波,冲……', + }, + ], + }, + { + url: '/common/video/mate40-pv.mp4', + comments:[ + { + src:'/common/images/002.gif', + name:'132******34', + date:'10-9', + commend:'你好棒!!!!!!!!!!!!', + }, + { + src:'/common/images/004.jpg', + name:'哈莫呢哦艾斯', + date:'10-9', + commend:'一起冲,我看这架势,后面还有好玩的可以继续冲', + }, + { + src:'/common/images/005.png', + name:'云司机', + date:'10-8', + commend:'电脑配置不行,还装着win7', + }, + ], + }, + ], + page:0, // 当前页面 + }, +// onInit() { +// this.page = 0 +//// 7913588, +//// 7913535 +// }, + + // 分布式调度 + transfer: async function() { + // 应用进行迁移 + let result = await FeatureAbility.continueAbility(); + console.info("result:" + JSON.stringify(result)); + }, + onStartContinuation() { + // 判断当前的状态是不是适合迁移 + console.info("onStartContinuation"); + return true; + }, + onCompleteContinuation(code) { + // 迁移操作完成,code返回结果 + console.info("CompleteContinuation: code = " + code); + }, + onSaveData(saveData) { + // 数据保存到savedData中进行迁移。 + var data = this.continueAbilityData; + Object.assign(saveData, data) + }, + // 迁移完成恢复数据 + onRestoreData(restoreData) { + // 收到迁移数据,恢复。 + this.continueAbilityData = restoreData; + }, + + // 获取当前页 + changePage(obj) { + this.page = obj.index + console.info("this.page = " + JSON.stringify(this.page)) + }, + // 获取输入内容 + changeValue(e) { + this.input = e.value + }, + // 发送评论 + send() { + console.info('this.page = ' + JSON.stringify(this.page)) + this.dataList[this.page].comments.push({ + src:'/common/images/000.jpg', + name:'liangzili', + date:'10-14', + commend:this.input, + }) + this.input = '' + }, + + + // 视频准备完成时触发该事件 + prepared(e) { + this.showPrompt('视频时长:' + e.duration + '秒'); + }, + // 视频开始播放 + start() { + this.showPrompt('视频开始播放'); + }, + // 视频暂停播放 + pause() { + this.showPrompt('视频暂停播放'); + }, + // 视频播放完成 + finish() { + this.$element('confirmDialog').show(); + }, + // 拖动进度条调用 + seeked(e) { + this.showPrompt('设置播放进度:' + e.currenttime + '秒'); + }, + // 播放进度变化调用 + timeupdate(e) { + + }, + // 自带组件进入全屏和退出全屏 + fullscreenchange(e) { + if (e.fullscreen === 1) { + this.isfullscreenchange = true; + } else { + this.isfullscreenchange = false; + } + }, + // 长按屏幕视频进入和退出全屏调用 + longPressFullscreenchange() { + if (this.isfullscreenchange) { // 全屏 + this.$element('video').exitFullscreen(); + this.isfullscreenchange = false; + } else { // 非全屏 + this.$element('video').requestFullscreen({ screenOrientation: 'default' }); + this.isfullscreenchange = true; + } + }, + + // dialog确定 + confirm() { + this.$element('video').start(); + this.$element('confirmDialog').close(); + }, + // dialog取消 + cancel() { + this.$element('confirmDialog').close(); + }, + // 弹框 + showPrompt(msg) { + prompt.showToast({ + message: msg, + duration: 1000 + }); + }, + // 点击视频 + hideControls() { + this.controlShow = !this.controlShow; + } + +}; diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/resources/base/element/string.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/resources/base/element/string.json" new file mode 100644 index 0000000000000000000000000000000000000000..0bae6bd40f7360d5d818998221b199d3ec0f69c0 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/resources/base/element/string.json" @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "entry_MainAbility", + "value": "entry_MainAbility" + }, + { + "name": "mainability_description", + "value": "JS_Empty Ability" + } + ] +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/resources/base/media/icon.png" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/resources/base/media/icon.png" new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/main/resources/base/media/icon.png" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/java/com/liangzili/jsvideoplayer/ExampleOhosTest.java" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/java/com/liangzili/jsvideoplayer/ExampleOhosTest.java" new file mode 100644 index 0000000000000000000000000000000000000000..736fc38a97a55a5e660042cfe8362980a6b4b672 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/java/com/liangzili/jsvideoplayer/ExampleOhosTest.java" @@ -0,0 +1,14 @@ +package com.liangzili.jsvideoplayer; + +import ohos.aafwk.ability.delegation.AbilityDelegatorRegistry; +import org.junit.Test; + +import static org.junit.Assert.assertEquals; + +public class ExampleOhosTest { + @Test + public void testBundleName() { + final String actualBundleName = AbilityDelegatorRegistry.getArguments().getTestBundleName(); + assertEquals("com.liangzili.jsvideoplayer", actualBundleName); + } +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/app.js" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/app.js" new file mode 100644 index 0000000000000000000000000000000000000000..55b67e96deb821033f71d30b6fff05efdeb0d901 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/app.js" @@ -0,0 +1,8 @@ +export default { + onCreate() { + console.info('TestApplication onCreate'); + }, + onDestroy() { + console.info('TestApplication onDestroy'); + } +}; diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/i18n/en-US.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/i18n/en-US.json" new file mode 100644 index 0000000000000000000000000000000000000000..55561b83737c3c31d082fbfa11e5fc987a351104 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/i18n/en-US.json" @@ -0,0 +1,8 @@ +{ + "strings": { + "hello": "Hello", + "world": "World" + }, + "Files": { + } +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/i18n/zh-CN.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/i18n/zh-CN.json" new file mode 100644 index 0000000000000000000000000000000000000000..cce1af06761a42add0cac1a0567aa3237eda8cb4 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/i18n/zh-CN.json" @@ -0,0 +1,8 @@ +{ + "strings": { + "hello": "您好", + "world": "世界" + }, + "Files": { + } +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/pages/index/index.css" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/pages/index/index.css" new file mode 100644 index 0000000000000000000000000000000000000000..4280f46eb56bbe20d60c8aaf4c7f55a444218174 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/pages/index/index.css" @@ -0,0 +1,11 @@ +.container { + flex-direction: column; + justify-content: center; + align-items: center; + width: 100%; + height: 100%; +} + +.title { + font-size: 100px; +} diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/pages/index/index.hml" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/pages/index/index.hml" new file mode 100644 index 0000000000000000000000000000000000000000..f64b040a5ae394dbaa5e185e1ecd4f4556b92184 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/pages/index/index.hml" @@ -0,0 +1,5 @@ +
+ + {{ $t('strings.hello') }} {{ title }} + +
diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/pages/index/index.js" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/pages/index/index.js" new file mode 100644 index 0000000000000000000000000000000000000000..8be2df2479a8da755ed800ad70d2b6247e21b8a2 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/default/pages/index/index.js" @@ -0,0 +1,41 @@ +import file from '@system.file' +import app from '@system.app' +import device from '@system.device' +import router from '@system.router' +import {Core, Constant, ExpectExtend, ReportExtend, InstrumentLog} from 'deccjsunit/index' + +export default { + data: { + title: "" + }, + onInit() { + this.title = this.$t('strings.world'); + }, + onShow() { + console.info('onShow finish') + const core = Core.getInstance() + const expectExtend = new ExpectExtend({ + 'id': 'extend' + }) + const reportExtend = new ReportExtend(file) + const instrumentLog = new InstrumentLog({ + 'id': 'report', + 'version': '1.0.3' + }) + core.addService('expect', expectExtend) + core.addService('report', reportExtend) + core.addService('report', instrumentLog) + core.init() + core.subscribeEvent('spec', instrumentLog) + core.subscribeEvent('suite', instrumentLog) + core.subscribeEvent('task', instrumentLog) + + const configService = core.getDefaultService('config') + configService.setConfig(this) + + require('../../../test/List.test') + core.execute() + }, + onReady() { + }, +} \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/test/ExampleJsunit.test.js" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/test/ExampleJsunit.test.js" new file mode 100644 index 0000000000000000000000000000000000000000..b6d74caed96ddede98edd1bc9292f6568cd1cfd1 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/test/ExampleJsunit.test.js" @@ -0,0 +1,10 @@ +import app from '@system.app' +import {describe, beforeAll, beforeEach, afterEach, afterAll, it, expect} from 'deccjsunit/index' + +describe('appInfoTest', function () { + it('app_info_test_001', 0, function () { + var info = app.getInfo() + expect(info.versionName).assertEqual('1.0') + expect(info.versionCode).assertEqual('3') + }) +}) \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/test/List.test.js" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/test/List.test.js" new file mode 100644 index 0000000000000000000000000000000000000000..305eb5bb254cd4802afaffebe68fca2f9436159f --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/js/test/List.test.js" @@ -0,0 +1 @@ +require('./ExampleJsunit.test.js') \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/resources/base/element/string.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/resources/base/element/string.json" new file mode 100644 index 0000000000000000000000000000000000000000..b89c583ff7eb9f8d419e91b4e93c633ca0795403 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/resources/base/element/string.json" @@ -0,0 +1,12 @@ +{ + "string": [ + { + "name": "app_name", + "value": "JsVideoPlayer" + }, + { + "name": "mainability_description", + "value": "hap sample empty page" + } + ] +} diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/resources/base/media/icon.png" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/resources/base/media/icon.png" new file mode 100644 index 0000000000000000000000000000000000000000..ce307a8827bd75456441ceb57d530e4c8d45d36c Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/entry/src/ohosTest/resources/base/media/icon.png" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradle.properties" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradle.properties" new file mode 100644 index 0000000000000000000000000000000000000000..be492496f9a20ac2d980ef4fc30061f4184c1c40 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradle.properties" @@ -0,0 +1,13 @@ +# Project-wide Gradle settings. +# IDE (e.g. DevEco Studio) users: +# Gradle settings configured through the IDE *will override* +# any settings specified in this file. +# For more details on how to configure your build environment visit +# http://www.gradle.org/docs/current/userguide/build_environment.html +# Specifies the JVM arguments used for the daemon process. +# The setting is particularly useful for tweaking memory settings. +# If the Chinese output is garbled, please configure the following parameter. +# This function is enabled by default when the DevEco Studio builds the hap/app,if you need disable gradle parallel,you should set org.gradle.parallel false. +# more information see https://docs.gradle.org/current/userguide/performance.html +# org.gradle.parallel=false +# org.gradle.jvmargs=-Dfile.encoding=GBK \ No newline at end of file diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradle/wrapper/gradle-wrapper.jar" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradle/wrapper/gradle-wrapper.jar" new file mode 100644 index 0000000000000000000000000000000000000000..490fda8577df6c95960ba7077c43220e5bb2c0d9 Binary files /dev/null and "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradle/wrapper/gradle-wrapper.jar" differ diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradle/wrapper/gradle-wrapper.properties" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradle/wrapper/gradle-wrapper.properties" new file mode 100644 index 0000000000000000000000000000000000000000..f59159e865d4b59feb1b8c44b001f62fc5d58df4 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradle/wrapper/gradle-wrapper.properties" @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +distributionUrl=https\://repo.huaweicloud.com/gradle/gradle-6.3-bin.zip +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradlew" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradlew" new file mode 100644 index 0000000000000000000000000000000000000000..2fe81a7d95e4f9ad2c9b2a046707d36ceb3980b3 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradlew" @@ -0,0 +1,183 @@ +#!/usr/bin/env sh + +# +# Copyright 2015 the original author or authors. +# +# 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 +# +# https://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. +# + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >/dev/null +APP_HOME="`pwd -P`" +cd "$SAVED" >/dev/null + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn () { + echo "$*" +} + +die () { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +nonstop=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; + NONSTOP* ) + nonstop=true + ;; +esac + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin or MSYS, switch paths to Windows format before running java +if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + JAVACMD=`cygpath --unix "$JAVACMD"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=`expr $i + 1` + done + case $i in + 0) set -- ;; + 1) set -- "$args0" ;; + 2) set -- "$args0" "$args1" ;; + 3) set -- "$args0" "$args1" "$args2" ;; + 4) set -- "$args0" "$args1" "$args2" "$args3" ;; + 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Escape application args +save () { + for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done + echo " " +} +APP_ARGS=`save "$@"` + +# Collect all arguments for the java command, following the shell quoting and substitution rules +eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" + +exec "$JAVACMD" "$@" diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradlew.bat" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradlew.bat" new file mode 100644 index 0000000000000000000000000000000000000000..62bd9b9ccefea2b65ae41e5d9a545e2021b90a1d --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/gradlew.bat" @@ -0,0 +1,103 @@ +@rem +@rem Copyright 2015 the original author or authors. +@rem +@rem Licensed under the Apache License, Version 2.0 (the "License"); +@rem you may not use this file except in compliance with the License. +@rem You may obtain a copy of the License at +@rem +@rem https://www.apache.org/licenses/LICENSE-2.0 +@rem +@rem Unless required by applicable law or agreed to in writing, software +@rem distributed under the License is distributed on an "AS IS" BASIS, +@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +@rem See the License for the specific language governing permissions and +@rem limitations under the License. +@rem + +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Resolve any "." and ".." in APP_HOME to make it shorter. +for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windows variants + +if not "%OS%" == "Windows_NT" goto win9xME_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/package.json" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/package.json" new file mode 100644 index 0000000000000000000000000000000000000000..0967ef424bce6791893e9a57bb952f80fd536e93 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/package.json" @@ -0,0 +1 @@ +{} diff --git "a/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/settings.gradle" "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/settings.gradle" new file mode 100644 index 0000000000000000000000000000000000000000..4773db73233a570c2d0c01a22e75321acfbf7a07 --- /dev/null +++ "b/\345\274\240\346\230\216\344\272\256/JsVideoPlayer/settings.gradle" @@ -0,0 +1 @@ +include ':entry'