merge docs and licenses and delete useless code (#10745)

* merge docs and licenses

* rename

* remove unneeded license
This commit is contained in:
Santy-Wang
2022-04-13 14:50:24 +08:00
committed by GitHub
parent 4f3925bea3
commit 051594e7cd
37 changed files with 768 additions and 1985 deletions
@@ -1,133 +1,133 @@
# Linter Auto-fix Guide
This is a guide to help you setting up the appropriate environment to enable auto-fixing most of the coding style check rules, including both `clang-format` and `clang-tidy`.
For now, **Visual Studio Code** is our first recommended IDE for the job, while a brief discussion about the support in different IDEs can be found at the end of this document.
## Environment Setup
* Make sure both `clang-tidy` and `clang-format` are directly accessible in your terminal environment, i.e. install LLVM and add the bin folder into the environment path. LLVM 11+ is recommended.
![](imgs/LLVM.png)
* Make sure you have `ANDROID_NDK_HOME` or `ANDROID_NDK_ROOT` or `NDK_ROOT` environment variable pointing to the Android NDK path.
![](imgs/NDK.png)
* Open terminal (or git-bash/MSYS2 if you are on windows), navigate to `engine-native` folder and run:
```bash
utils/generate_compile_commands_android.sh # other platforms
utils/generate_compile_commands_android_windows.sh # if using git-bash on windows
```
If it succeeds, you should see a `compile_commands.json` generated in the same folder, and ignored by git.
![](imgs/compile_commands.png)
> Note: The `compile_commands.json` generated by the current approach is essentially the Android development environment. So other platform-specific code may likely not be included in the check. This behavior is consistent with the CI test environment.
> Also note: After changes been made to CMake configurations, the `compile_commands.json` should be regenerated by running the same script in the last step.
## VS Code With `clangd` and `Command Runner` Extension
* Install both `clangd` and `Command Runner` extension from the market:
![](imgs/extensions.png)
* If everything goes smoothly, after opening any source file, you should be able to see the `clang-tidy` extension's linting process and its output as warnings right inside the editor, without any errors.
![](imgs/editor-lint.png)
* But in the case when you do see errors popping up like this: (note the red color in the scroll bar)
![](imgs/editor-lint-error.png)
That means you have compile errors **for this single file**. Since it does compile on our target platforms as part of the engine project library, the most common cause for this issue is that it is not self-contained, i.e. the file does not include what it uses. You should always include all the headers your file depends on.
In the case of this screenshot, the declaration of the base class `Object` is missing, so we are indeed missing headers.
* After clearing the compile errors, you can fix most the issue by just clicking the light bulb on the side and choose an appropriate action.
![](imgs/manual-auto-fix.png)
There are two important notes here:
* The issues reported here all come from `clangd` the language server, which only supports a subset of `clang-tidy` rules.
* It appears to be no 'fix-all' option in the editor.
This is where the `Command Runner` extension comes in and saves the day: we can assign a suitable key binding to run any CLI commands, e.g. invoke the `clang-tidy` proper and fix all the issues in the current file!
* Open the VSCode settings (JSON) and add the following property:
![](imgs/vscode-settings.png)
```js
"command-runner.commands": {
"tidy": "clang-tidy -fix '${file}'"
}
```
* Open the keyboard shortcut preference (JSON) and add the following property:
![](imgs/keyboard-shortcut.png)
```js
{
"key": "shift+alt+c", // set this to any key binding that works best for you
"command": "command-runner.run",
"args": { "command": "tidy" }
}
```
> Note: for more detailed instructions on setting keybindings, etc. refer to the `Command Runner` extension page.
* If everything goes smoothly, you can finally auto-fix all the issues in the current opened file with a single key binding:
![](imgs/auto-fix.gif)
Note that after auto-fix some issue could morph into new ones. (e.g. at line 774 in the screenshot above, the iterator type was auto-fixed into a simple `auto`, which in turn triggered another linter issue) Just remain calm and execute the fix again and most of them will be fixed correctly.
Also note that by invoking `clang-tidy`, this is an unavoidably time-consuming process.
* For `clang-format` issues, there are no in-place editor suggestions, but all issues are strictly auto-fixable, and if the environment set up above goes smoothly, it is as simple as executing the `Format Document` command. (By default `Shift + Alt + F` on Windows)
![](imgs/format.png)
This functionality is provided by the `clangd` extension too.
![](imgs/auto-format.gif)
On the contrary to `clang-tidy`, `clang-format` auto-formatting is an immediate operation and should be used frequently.
## More Command Line Utilities
On top of all the above infrastructures, we provide a bash script to apply auto-fix (both clang-tidy and clang-format issues) on all the changed files in arbitrary commit/range:
First make sure the environment setup steps are done, i.e. `compile_commands.json` has been generated, then:
```bash
utils/fix-tidy-format.sh # run auto-fix on files changed in the latest commit
utils/fix-tidy-format.sh 70181ed # run auto-fix on files changed in the specified commit
utils/fix-tidy-format.sh HEAD~3..HEAD # run auto-fix on files changed in the last 3 commit
```
All the issues will be reported in the standard output. This can be used as local self-test runs for CI checks.
## Usage of `NOLINT`
The general rule is: DO NOT USE IT.
That being said, however, sometimes due to various reasons (clang-tidy false positives, fixing legacy codebase just requires too much work, etc.), when there is just no way around, you can use them with specific rule tags and reasons for why it has to be this way:
```cpp
// NOLINTNEXTLINE(google-explicit-constructor) false positive when involving __VA_ARGS__
CC_VMATH_STRUCT(Model, transform, color, enabled)
```
Never use `NOLINT` without any explanations or rule tags.
## Other IDEs
It is possible to use other IDEs as long as they [support clang-tidy](https://clang.llvm.org/extra/clang-tidy/Integrations.html).
Notably there is `CLion`, or the `Resharper C++` MSVC extension that can do a fairly decent job on analyzing and fixing linter issues. But both are commercially licensed and [intentionally](https://resharper-support.jetbrains.com/hc/en-us/articles/207242695-Can-I-fix-all-issues-Quick-Fixes-naming-suggestions-etc-at-once-) lacks the functionality to apply fixes to all the issues. They can either apply auto-fix per issue instance or apply to the whole project by issue types.
Considering the current circumstances this is usually not what we want in daily development, since the more files we touch, the heavier the burden is to pass the CI check, which detects problems on all the changed files in a single pull request.
# Linter Auto-fix Guide
This is a guide to help you setting up the appropriate environment to enable auto-fixing most of the coding style check rules, including both `clang-format` and `clang-tidy`.
For now, **Visual Studio Code** is our first recommended IDE for the job, while a brief discussion about the support in different IDEs can be found at the end of this document.
## Environment Setup
* Make sure both `clang-tidy` and `clang-format` are directly accessible in your terminal environment, i.e. install LLVM and add the bin folder into the environment path. LLVM 11+ is recommended.
![](imgs/LLVM.png)
* Make sure you have `ANDROID_NDK_HOME` or `ANDROID_NDK_ROOT` or `NDK_ROOT` environment variable pointing to the Android NDK path.
![](imgs/NDK.png)
* Open terminal (or git-bash/MSYS2 if you are on windows), navigate to `engine-native` folder and run:
```bash
utils/generate_compile_commands_android.sh # other platforms
utils/generate_compile_commands_android_windows.sh # if using git-bash on windows
```
If it succeeds, you should see a `compile_commands.json` generated in the same folder, and ignored by git.
![](imgs/compile_commands.png)
> Note: The `compile_commands.json` generated by the current approach is essentially the Android development environment. So other platform-specific code may likely not be included in the check. This behavior is consistent with the CI test environment.
> Also note: After changes been made to CMake configurations, the `compile_commands.json` should be regenerated by running the same script in the last step.
## VS Code With `clangd` and `Command Runner` Extension
* Install both `clangd` and `Command Runner` extension from the market:
![](imgs/extensions.png)
* If everything goes smoothly, after opening any source file, you should be able to see the `clang-tidy` extension's linting process and its output as warnings right inside the editor, without any errors.
![](imgs/editor-lint.png)
* But in the case when you do see errors popping up like this: (note the red color in the scroll bar)
![](imgs/editor-lint-error.png)
That means you have compile errors **for this single file**. Since it does compile on our target platforms as part of the engine project library, the most common cause for this issue is that it is not self-contained, i.e. the file does not include what it uses. You should always include all the headers your file depends on.
In the case of this screenshot, the declaration of the base class `Object` is missing, so we are indeed missing headers.
* After clearing the compile errors, you can fix most the issue by just clicking the light bulb on the side and choose an appropriate action.
![](imgs/manual-auto-fix.png)
There are two important notes here:
* The issues reported here all come from `clangd` the language server, which only supports a subset of `clang-tidy` rules.
* It appears to be no 'fix-all' option in the editor.
This is where the `Command Runner` extension comes in and saves the day: we can assign a suitable key binding to run any CLI commands, e.g. invoke the `clang-tidy` proper and fix all the issues in the current file!
* Open the VSCode settings (JSON) and add the following property:
![](imgs/vscode-settings.png)
```js
"command-runner.commands": {
"tidy": "clang-tidy -fix '${file}'"
}
```
* Open the keyboard shortcut preference (JSON) and add the following property:
![](imgs/keyboard-shortcut.png)
```js
{
"key": "shift+alt+c", // set this to any key binding that works best for you
"command": "command-runner.run",
"args": { "command": "tidy" }
}
```
> Note: for more detailed instructions on setting keybindings, etc. refer to the `Command Runner` extension page.
* If everything goes smoothly, you can finally auto-fix all the issues in the current opened file with a single key binding:
![](imgs/auto-fix.gif)
Note that after auto-fix some issue could morph into new ones. (e.g. at line 774 in the screenshot above, the iterator type was auto-fixed into a simple `auto`, which in turn triggered another linter issue) Just remain calm and execute the fix again and most of them will be fixed correctly.
Also note that by invoking `clang-tidy`, this is an unavoidably time-consuming process.
* For `clang-format` issues, there are no in-place editor suggestions, but all issues are strictly auto-fixable, and if the environment set up above goes smoothly, it is as simple as executing the `Format Document` command. (By default `Shift + Alt + F` on Windows)
![](imgs/format.png)
This functionality is provided by the `clangd` extension too.
![](imgs/auto-format.gif)
On the contrary to `clang-tidy`, `clang-format` auto-formatting is an immediate operation and should be used frequently.
## More Command Line Utilities
On top of all the above infrastructures, we provide a bash script to apply auto-fix (both clang-tidy and clang-format issues) on all the changed files in arbitrary commit/range:
First make sure the environment setup steps are done, i.e. `compile_commands.json` has been generated, then:
```bash
utils/fix-tidy-format.sh # run auto-fix on files changed in the latest commit
utils/fix-tidy-format.sh 70181ed # run auto-fix on files changed in the specified commit
utils/fix-tidy-format.sh HEAD~3..HEAD # run auto-fix on files changed in the last 3 commit
```
All the issues will be reported in the standard output. This can be used as local self-test runs for CI checks.
## Usage of `NOLINT`
The general rule is: DO NOT USE IT.
That being said, however, sometimes due to various reasons (clang-tidy false positives, fixing legacy codebase just requires too much work, etc.), when there is just no way around, you can use them with specific rule tags and reasons for why it has to be this way:
```cpp
// NOLINTNEXTLINE(google-explicit-constructor) false positive when involving __VA_ARGS__
CC_VMATH_STRUCT(Model, transform, color, enabled)
```
Never use `NOLINT` without any explanations or rule tags.
## Other IDEs
It is possible to use other IDEs as long as they [support clang-tidy](https://clang.llvm.org/extra/clang-tidy/Integrations.html).
Notably there is `CLion`, or the `Resharper C++` MSVC extension that can do a fairly decent job on analyzing and fixing linter issues. But both are commercially licensed and [intentionally](https://resharper-support.jetbrains.com/hc/en-us/articles/207242695-Can-I-fix-all-issues-Quick-Fixes-naming-suggestions-etc-at-once-) lacks the functionality to apply fixes to all the issues. They can either apply auto-fix per issue instance or apply to the whole project by issue types.
Considering the current circumstances this is usually not what we want in daily development, since the more files we touch, the heavier the burden is to pass the CI check, which detects problems on all the changed files in a single pull request.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Before

Width:  |  Height:  |  Size: 346 KiB

After

Width:  |  Height:  |  Size: 346 KiB

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Before

Width:  |  Height:  |  Size: 9.2 KiB

After

Width:  |  Height:  |  Size: 9.2 KiB

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.9 KiB

-550
View File
@@ -1,550 +0,0 @@
/****************************************************************************
Copyright (c) 2013-2016 Chukong Technologies Inc.
Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
http://www.cocos.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
to use Cocos Creator solely to develop games on your target platforms. You shall
not use Cocos Creator software for developing other software or tools that's
used for developing games. You are not granted to publish, distribute,
sublicense, and/or sell copies of Cocos Creator.
The software or tools in this License Agreement are licensed, not sold.
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
const VideoPlayerImpl = require('./video-player-impl');
/**
* !#en Video event type
* !#zh 视频事件类型
* @enum VideoPlayer.EventType
*/
/**
* !#en play
* !#zh 播放
* @property {Number} PLAYING
*/
/**
* !#en pause
* !#zh 暂停
* @property {Number} PAUSED
*/
/**
* !#en stop
* !#zh 停止
* @property {Number} STOPPED
*/
/**
* !#en play end
* !#zh 播放结束
* @property {Number} COMPLETED
*/
/**
* !#en meta data is loaded
* !#zh 视频的元信息已加载完成,你可以调用 getDuration 来获取视频总时长
* @property {Number} META_LOADED
*/
/**
* !#en clicked by the user
* !#zh 视频被用户点击了
* @property {Number} CLICKED
*/
/**
* !#en ready to play, this event is not guaranteed to be triggered on all platform or browser, please don't rely on it to play your video.<br/>
* !#zh 视频准备好了,这个事件并不保障会在所有平台或浏览器中被触发,它依赖于平台实现,请不要依赖于这个事件做视频播放的控制。
* @property {Number} READY_TO_PLAY
*/
const EventType = VideoPlayerImpl.EventType;
/**
* !#en Enum for video resouce type type.
* !#zh 视频来源
* @enum VideoPlayer.ResourceType
*/
const ResourceType = cc.Enum({
/**
* !#en The remote resource type.
* !#zh 远程视频
* @property {Number} REMOTE
*/
REMOTE: 0,
/**
* !#en The local resouce type.
* !#zh 本地视频
* @property {Number} LOCAL
*/
LOCAL: 1
});
/**
* !#en cc.VideoPlayer is a component for playing videos, you can use it for showing videos in your game.
* !#zh Video 组件,用于在游戏中播放视频
* @class VideoPlayer
* @extends Component
*/
let VideoPlayer = cc.Class({
name: 'cc.VideoPlayer',
extends: cc.Component,
editor: CC_EDITOR && {
menu: 'i18n:MAIN_MENU.component.ui/VideoPlayer',
inspector: 'packages://inspector/inspectors/comps/videoplayer.js',
help: 'i18n:COMPONENT.help_url.videoplayer',
executeInEditMode: true
},
properties: {
_resourceType: ResourceType.REMOTE,
/**
* !#en The resource type of videoplayer, REMOTE for remote url and LOCAL for local file path.
* !#zh 视频来源:REMOTE 表示远程视频 URL,LOCAL 表示本地视频地址。
* @property {VideoPlayer.ResourceType} resourceType
*/
resourceType: {
tooltip: CC_DEV && 'i18n:COMPONENT.videoplayer.resourceType',
type: ResourceType,
set: function (value) {
this._resourceType = value;
this._updateVideoSource();
},
get: function () {
return this._resourceType;
}
},
_remoteURL: '',
/**
* !#en The remote URL of video.
* !#zh 远程视频的 URL
* @property {String} remoteURL
*/
remoteURL: {
tooltip: CC_DEV && 'i18n:COMPONENT.videoplayer.url',
type: cc.String,
set: function (url) {
this._remoteURL = url;
this._updateVideoSource();
},
get: function () {
return this._remoteURL;
}
},
_clip: {
default: null,
type: cc.Asset
},
/**
* !#en The local video full path.
* !#zh 本地视频的 URL
* @property {String} clip
*/
clip: {
tooltip: CC_DEV && 'i18n:COMPONENT.videoplayer.video',
get: function () {
return this._clip;
},
set: function (value) {
this._clip = value;
this._updateVideoSource();
},
type: cc.Asset
},
/**
* !#en The current playback time of the now playing item in seconds, you could also change the start playback time.
* !#zh 指定视频从什么时间点开始播放,单位是秒,也可以用来获取当前视频播放的时间进度。
* @property {Number} currentTime
*/
currentTime: {
tooltip: CC_DEV && 'i18n:COMPONENT.videoplayer.currentTime',
type: cc.Float,
set: function (time) {
if (this._impl) {
this._impl.seekTo(time);
}
},
get: function () {
if (this._impl) {
return this._impl.currentTime();
}
return -1;
}
},
_volume: 1,
/**
* !#en The volume of the video.
* !#zh 视频的音量(0.0 ~ 1.0)
* @property volume
* @type {Number}
* @default 1
*/
volume: {
get: function () {
return this._volume;
},
set: function (value) {
this._volume = value;
if (this.isPlaying() && !this._mute) {
this._syncVolume();
}
},
range: [0, 1],
type: cc.Float,
tooltip: CC_DEV && 'i18n:COMPONENT.videoplayer.volume'
},
_mute: false,
/**
* !#en Mutes the VideoPlayer. Mute sets the volume=0, Un-Mute restore the original volume.
* !#zh 是否静音视频。静音时设置音量为 0,取消静音是恢复原来的音量。
* @property mute
* @type {Boolean}
* @default false
*/
mute: {
get: function () {
return this._mute;
},
set: function (value) {
this._mute = value;
this._syncVolume();
},
tooltip: CC_DEV && 'i18n:COMPONENT.videoplayer.mute',
},
/**
* !#en Whether keep the aspect ration of the original video.
* !#zh 是否保持视频原来的宽高比
* @property {Boolean} keepAspectRatio
*/
keepAspectRatio: {
tooltip: CC_DEV && 'i18n:COMPONENT.videoplayer.keepAspectRatio',
default: true,
type: cc.Boolean,
notify: function () {
this._impl.setKeepAspectRatioEnabled(this.keepAspectRatio);
}
},
/**
* !#en Whether play video in fullscreen mode.
* !#zh 是否全屏播放视频
* @property {Boolean} isFullscreen
*/
isFullscreen: {
tooltip: CC_DEV && 'i18n:COMPONENT.videoplayer.isFullscreen',
default: false,
type: cc.Boolean,
notify: function () {
this._impl.setFullScreenEnabled(this.isFullscreen);
}
},
/**
* !#en the video player's callback, it will be triggered when certain event occurs, like: playing, paused, stopped and completed.
* !#zh 视频播放回调函数,该回调函数会在特定情况被触发,比如播放中,暂时,停止和完成播放。
* @property {Component.EventHandler[]} videoPlayerEvent
*/
videoPlayerEvent: {
default: [],
type: cc.Component.EventHandler,
},
},
statics: {
EventType: EventType,
ResourceType: ResourceType
},
ctor () {
this._impl = new VideoPlayerImpl();
},
_syncVolume () {
let impl = this._impl;
if (impl) {
let volume = this._mute ? 0 : this._volume;
impl.setVolume(volume);
}
},
_updateVideoSource () {
let url = '';
if (this.resourceType === ResourceType.REMOTE) {
url = this.remoteURL;
}
else if (this._clip) {
url = this._clip.nativeUrl || '';
}
if (url && cc.loader.md5Pipe) {
url = cc.loader.md5Pipe.transformURL(url);
}
this._impl.setURL(url);
},
onLoad () {
let impl = this._impl;
if (impl) {
impl.createDomElementIfNeeded();
this._updateVideoSource();
impl.seekTo(this.currentTime);
impl.setKeepAspectRatioEnabled(this.keepAspectRatio);
impl.setFullScreenEnabled(this.isFullscreen);
this.pause();
if (!CC_EDITOR) {
impl.setEventListener(EventType.PLAYING, this.onPlaying.bind(this));
impl.setEventListener(EventType.PAUSED, this.onPaused.bind(this));
impl.setEventListener(EventType.STOPPED, this.onStopped.bind(this));
impl.setEventListener(EventType.COMPLETED, this.onCompleted.bind(this));
impl.setEventListener(EventType.META_LOADED, this.onMetaLoaded.bind(this));
impl.setEventListener(EventType.CLICKED, this.onClicked.bind(this));
impl.setEventListener(EventType.READY_TO_PLAY, this.onReadyToPlay.bind(this));
}
}
},
onRestore () {
if (!this._impl) {
this._impl = new VideoPlayerImpl();
}
},
onEnable () {
if (this._impl) {
this._impl.enable();
}
},
onDisable () {
if (this._impl) {
this._impl.disable();
}
},
onDestroy () {
if (this._impl) {
this._impl.destroy();
this._impl = null;
}
},
update (dt) {
if (this._impl) {
this._impl.updateMatrix(this.node);
}
},
onReadyToPlay () {
cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.READY_TO_PLAY);
this.node.emit('ready-to-play', this);
},
onMetaLoaded () {
cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.META_LOADED);
this.node.emit('meta-loaded', this);
},
onClicked () {
cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.CLICKED);
this.node.emit('clicked', this);
},
onPlaying () {
cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.PLAYING);
this.node.emit('playing', this);
},
onPaused () {
cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.PAUSED);
this.node.emit('paused', this);
},
onStopped () {
cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.STOPPED);
this.node.emit('stopped', this);
},
onCompleted () {
cc.Component.EventHandler.emitEvents(this.videoPlayerEvent, this, EventType.COMPLETED);
this.node.emit('completed', this);
},
/**
* !#en If a video is paused, call this method could resume playing. If a video is stopped, call this method to play from scratch.
* !#zh 如果视频被暂停播放了,调用这个接口可以继续播放。如果视频被停止播放了,调用这个接口可以从头开始播放。
* @method play
*/
play () {
if (this._impl) {
this._syncVolume();
this._impl.play();
}
},
/**
* !#en If a video is paused, call this method to resume playing.
* !#zh 如果一个视频播放被暂停播放了,调用这个接口可以继续播放。
* @method resume
*/
resume () {
if (this._impl) {
this._syncVolume();
this._impl.resume();
}
},
/**
* !#en If a video is playing, call this method to pause playing.
* !#zh 如果一个视频正在播放,调用这个接口可以暂停播放。
* @method pause
*/
pause () {
if (this._impl) {
this._impl.pause();
}
},
/**
* !#en If a video is playing, call this method to stop playing immediately.
* !#zh 如果一个视频正在播放,调用这个接口可以立马停止播放。
* @method stop
*/
stop () {
if (this._impl) {
this._impl.stop();
}
},
/**
* !#en Gets the duration of the video
* !#zh 获取视频文件的播放总时长
* @method getDuration
* @returns {Number}
*/
getDuration () {
if (this._impl) {
return this._impl.duration();
}
return -1;
},
/**
* !#en Determine whether video is playing or not.
* !#zh 判断当前视频是否处于播放状态
* @method isPlaying
* @returns {Boolean}
*/
isPlaying () {
if (this._impl) {
return this._impl.isPlaying();
}
return false;
}
/**
* !#en if you don't need the VideoPlayer and it isn't in any running Scene, you should
* call the destroy method on this component or the associated node explicitly.
* Otherwise, the created DOM element won't be removed from web page.
* !#zh
* 如果你不再使用 VideoPlayer,并且组件未添加到场景中,那么你必须手动对组件或所在节点调用 destroy。
* 这样才能移除网页上的 DOM 节点,避免 Web 平台内存泄露。
* @example
* videoplayer.node.parent = null; // or videoplayer.node.removeFromParent(false);
* // when you don't need videoplayer anymore
* videoplayer.node.destroy();
* @method destroy
* @return {Boolean} whether it is the first time the destroy being called
*/
});
cc.VideoPlayer = module.exports = VideoPlayer;
/**
* !#en
* Note: This event is emitted from the node to which the component belongs.
* !#zh
* 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。
* @event ready-to-play
* @param {Event.EventCustom} event
* @param {VideoPlayer} videoPlayer - The VideoPlayer component.
*/
/**
* !#en
* Note: This event is emitted from the node to which the component belongs.
* !#zh
* 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。
* @event meta-loaded
* @param {Event.EventCustom} event
* @param {VideoPlayer} videoPlayer - The VideoPlayer component.
*/
/**
* !#en
* Note: This event is emitted from the node to which the component belongs.
* !#zh
* 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。
* @event clicked
* @param {Event.EventCustom} event
* @param {VideoPlayer} videoPlayer - The VideoPlayer component.
*/
/**
* !#en
* Note: This event is emitted from the node to which the component belongs.
* !#zh
* 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。
* @event playing
* @param {Event.EventCustom} event
* @param {VideoPlayer} videoPlayer - The VideoPlayer component.
*/
/**
* !#en
* Note: This event is emitted from the node to which the component belongs.
* !#zh
* 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。
* @event paused
* @param {Event.EventCustom} event
* @param {VideoPlayer} videoPlayer - The VideoPlayer component.
*/
/**
* !#en
* Note: This event is emitted from the node to which the component belongs.
* !#zh
* 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。
* @event stopped
* @param {Event.EventCustom} event
* @param {VideoPlayer} videoPlayer - The VideoPlayer component.
*/
/**
* !#en
* Note: This event is emitted from the node to which the component belongs.
* !#zh
* 注意:此事件是从该组件所属的 Node 上面派发出来的,需要用 node.on 来监听。
* @event completed
* @param {Event.EventCustom} event
* @param {VideoPlayer} videoPlayer - The VideoPlayer component.
*/
-579
View File
@@ -1,579 +0,0 @@
/****************************************************************************
Copyright (c) 2017-2020 Xiamen Yaji Software Co., Ltd.
http://www.cocos.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated engine source code (the "Software"), a limited,
worldwide, royalty-free, non-assignable, revocable and non-exclusive license
to use Cocos Creator solely to develop games on your target platforms. You shall
not use Cocos Creator software for developing other software or tools that's
used for developing games. You are not granted to publish, distribute,
sublicense, and/or sell copies of Cocos Creator.
The software or tools in this License Agreement are licensed, not sold.
Xiamen Yaji Software Co., Ltd. reserves all rights not expressly granted to you.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
const utils = require('../core/platform/utils');
const sys = require('../core/platform/sys');
const renderEngine = require('../core/renderer/render-engine');
const math = renderEngine.math;
let _mat4_temp = math.mat4.create();
// ios brower need to wait until the video's loadedmetadata event
// has been fired before calling webkitEnterFullScreen()
function triggerFullScene (video, enable) {
if (!video) return;
if (enable) {
video.webkitEnterFullscreen && video.webkitEnterFullscreen();
}
else {
video.webkitExitFullscreen && video.webkitExitFullscreen();
}
}
let VideoPlayerImpl = cc.Class({
name: 'VideoPlayerImpl',
ctor () {
// 播放结束等事件处理的队列
this._EventList = {};
this._video = null;
this._url = '';
this._fullScreenEnabled = false;
this._loadedmeta = false;
this._loaded = false;
this._visible = false;
// 有一些浏览器第一次播放视频需要特殊处理,这个标记用来标识是否播放过
this._played = false;
this._playing = false;
this._ignorePause = false;
// update matrix cache
this._forceUpdate = true;
this._m00 = 0;
this._m01 = 0;
this._m04 = 0;
this._m05 = 0;
this._m12 = 0;
this._m13 = 0;
this._w = 0;
this._h = 0;
//
this.__eventListeners = {};
},
_bindEvent () {
let video = this._video, self = this;
//binding event
let cbs = this.__eventListeners;
cbs.loadedmetadata = function () {
this._loadedmeta = true;
if (sys.os === sys.OS.IOS && sys.isBrowser) {
triggerFullScene(video, self._fullScreenEnabled);
}
self._dispatchEvent(VideoPlayerImpl.EventType.META_LOADED);
};
cbs.ended = function () {
if (self._video !== video) return;
self._playing = false;
self._dispatchEvent(VideoPlayerImpl.EventType.COMPLETED);
};
cbs.play = function () {
if (self._video !== video) return;
self._playing = true;
self._dispatchEvent(VideoPlayerImpl.EventType.PLAYING);
};
cbs.pause = function () {
if (self._ignorePause || self._video !== video) return;
self._playing = false;
self._dispatchEvent(VideoPlayerImpl.EventType.PAUSED);
};
cbs.click = function () {
self._dispatchEvent(VideoPlayerImpl.EventType.CLICKED);
};
video.addEventListener("loadedmetadata", cbs.loadedmetadata);
video.addEventListener("ended", cbs.ended);
video.addEventListener("play", cbs.play);
video.addEventListener("pause", cbs.pause);
video.addEventListener("click", cbs.click);
function onCanPlay () {
if (this._loaded)
return;
let video = this._video;
if (video.readyState === 4) {
this._loaded = true;
// node.setContentSize(node._contentSize.width, node._contentSize.height);
video.currentTime = 0;
this._dispatchEvent(VideoPlayerImpl.EventType.READY_TO_PLAY);
this._updateVisibility();
}
}
cbs.onCanPlay = onCanPlay.bind(this);
video.addEventListener('canplay', cbs.onCanPlay);
video.addEventListener('canplaythrough', cbs.onCanPlay);
video.addEventListener('suspend', cbs.onCanPlay);
},
_updateVisibility () {
if (!this._video) return;
let video = this._video;
if (this._visible) {
video.style.visibility = 'visible';
}
else {
video.style.visibility = 'hidden';
video.pause();
this._playing = false;
}
this._forceUpdate = true;
},
_updateSize (width, height) {
let video = this._video;
if (!video) return;
video.style.width = width + 'px';
video.style.height = height + 'px';
},
_createDom () {
let video = document.createElement('video');
video.style.position = "absolute";
video.style.bottom = "0px";
video.style.left = "0px";
video.className = "cocosVideo";
video.setAttribute('preload', 'auto');
video.setAttribute('webkit-playsinline', '');
video.setAttribute('playsinline', '');
// Stupid tencent x5 adaptation
let orientation = cc.winSize.width > cc.winSize.height ? "landscape" : "portrait";
video.setAttribute("x5-playsinline", "");
video.setAttribute("x5-video-player-type", "h5");
video.setAttribute("x5-video-orientation", orientation);
this._video = video;
cc.game.container.appendChild(video);
},
createDomElementIfNeeded: function () {
if (!this._video) {
this._createDom();
}
},
removeDom () {
let video = this._video;
if (video) {
let hasChild = utils.contains(cc.game.container, video);
if (hasChild)
cc.game.container.removeChild(video);
let cbs = this.__eventListeners;
video.removeEventListener("loadedmetadata", cbs.loadedmetadata);
video.removeEventListener("ended", cbs.ended);
video.removeEventListener("play", cbs.play);
video.removeEventListener("pause", cbs.pause);
video.removeEventListener("click", cbs.click);
video.removeEventListener("canplay", cbs.onCanPlay);
video.removeEventListener("canplaythrough", cbs.onCanPlay);
video.removeEventListener("suspend", cbs.onCanPlay);
cbs.loadedmetadata = null;
cbs.ended = null;
cbs.play = null;
cbs.pause = null;
cbs.click = null;
cbs.onCanPlay = null;
}
this._video = null;
this._url = "";
},
setURL (path) {
let source, extname;
if (this._url === path) {
return;
}
this._url = path;
this.removeDom();
this.createDomElementIfNeeded();
this._bindEvent();
let video = this._video;
video.style["visibility"] = "hidden";
this._loaded = false;
this._played = false;
this._playing = false;
this._loadedmeta = false;
source = document.createElement("source");
source.src = path;
video.appendChild(source);
extname = cc.path.extname(path);
let polyfill = VideoPlayerImpl._polyfill;
for (let i = 0; i < polyfill.canPlayType.length; i++) {
if (extname !== polyfill.canPlayType[i]) {
source = document.createElement("source");
source.src = path.replace(extname, polyfill.canPlayType[i]);
video.appendChild(source);
}
}
},
getURL: function() {
return this._url;
},
play: function () {
let video = this._video;
if (!video || !this._visible) return;
this._played = true;
if (this._playing) {
return;
}
if (VideoPlayerImpl._polyfill.autoplayAfterOperation) {
let self = this;
setTimeout(function () {
video.play();
self._playing = !video.paused;
}, 20);
}
else {
video.play();
this._playing = !video.paused;
}
},
pause: function () {
let video = this._video;
if (!this._playing) return;
this._playing = false;
if (!video) {
return;
}
video.pause();
},
_resume: function () {
this.play();
},
stop: function () {
let video = this._video;
if (!video || !this._visible) return;
this._ignorePause = true;
video.pause();
let self = this;
setTimeout(function () {
self._dispatchEvent(VideoPlayerImpl.EventType.STOPPED);
self._ignorePause = false;
}, 0);
// 恢复到视频起始位置
video.currentTime = 0;
this._playing = false;
},
setVolume: function (volume) {
let video = this._video;
if (video) {
video.volume = volume;
}
},
seekTo: function (time) {
let video = this._video;
if (!video) return;
if (this._loaded) {
video.currentTime = time;
}
else {
let cb = function () {
video.currentTime = time;
video.removeEventListener(VideoPlayerImpl._polyfill.event, cb);
};
video.addEventListener(VideoPlayerImpl._polyfill.event, cb);
}
if (VideoPlayerImpl._polyfill.autoplayAfterOperation && this.isPlaying()) {
setTimeout(function () {
video.play();
}, 20);
}
},
isPlaying: function () {
let video = this._video;
if (VideoPlayerImpl._polyfill.autoplayAfterOperation && this._playing) {
setTimeout(function () {
video.play();
}, 20);
}
return this._playing;
},
duration: function () {
let video = this._video;
let duration = -1;
if (!video) return duration;
duration = video.duration;
if (duration <= 0) {
cc.logID(7702);
}
return duration;
},
currentTime: function() {
let video = this._video;
if (!video) return -1;
return video.currentTime;
},
setKeepAspectRatioEnabled: function () {
cc.logID(7700);
},
isKeepAspectRatioEnabled: function () {
return true;
},
setFullScreenEnabled: function (enable) {
let video = this._video;
if (!video) {
return;
}
if (sys.os === sys.OS.IOS && sys.isBrowser) {
this._fullScreenEnabled = enable;
if (this._loadedmeta) {
triggerFullScene(video, enable);
}
}
else {
if (enable) {
cc.screen.requestFullScreen(video);
}
else {
cc.screen.exitFullScreen(video);
}
}
},
isFullScreenEnabled: function () {
return this._fullScreenEnabled;
},
setEventListener: function (event, callback) {
this._EventList[event] = callback;
},
removeEventListener: function (event) {
this._EventList[event] = null;
},
_dispatchEvent: function (event) {
let callback = this._EventList[event];
if (callback)
callback.call(this, this, this._video.src);
},
onPlayEvent: function () {
let callback = this._EventList[VideoPlayerImpl.EventType.PLAYING];
callback.call(this, this, this._video.src);
},
enable: function () {
let list = VideoPlayerImpl.elements;
if (list.indexOf(this) === -1)
list.push(this);
this.setVisible(true);
},
disable: function () {
let list = VideoPlayerImpl.elements;
let index = list.indexOf(this);
if (index !== -1)
list.splice(index, 1);
this.setVisible(false);
},
destroy: function () {
this.disable();
this.removeDom();
},
setVisible: function (visible) {
if (this._visible !== visible) {
this._visible = !!visible;
this._updateVisibility();
}
},
updateMatrix (node) {
if (!this._video || !this._visible) return;
node.getWorldMatrix(_mat4_temp);
if (!this._forceUpdate &&
this._m00 === _mat4_temp.m00 && this._m01 === _mat4_temp.m01 &&
this._m04 === _mat4_temp.m04 && this._m05 === _mat4_temp.m05 &&
this._m12 === _mat4_temp.m12 && this._m13 === _mat4_temp.m13 &&
this._w === node._contentSize.width && this._h === node._contentSize.height) {
return;
}
// update matrix cache
this._m00 = _mat4_temp.m00;
this._m01 = _mat4_temp.m01;
this._m04 = _mat4_temp.m04;
this._m05 = _mat4_temp.m05;
this._m12 = _mat4_temp.m12;
this._m13 = _mat4_temp.m13;
this._w = node._contentSize.width;
this._h = node._contentSize.height;
let scaleX = cc.view._scaleX, scaleY = cc.view._scaleY;
let dpr = cc.view._devicePixelRatio;
scaleX /= dpr;
scaleY /= dpr;
let container = cc.game.container;
let a = _mat4_temp.m00 * scaleX, b = _mat4_temp.m01, c = _mat4_temp.m04, d = _mat4_temp.m05 * scaleY;
let offsetX = container && container.style.paddingLeft ? parseInt(container.style.paddingLeft) : 0;
let offsetY = container && container.style.paddingBottom ? parseInt(container.style.paddingBottom) : 0;
let w, h;
if (VideoPlayerImpl._polyfill.zoomInvalid) {
this._updateSize(this._w * a, this._h * d);
a = 1;
d = 1;
w = this._w * scaleX;
h = this._h * scaleY;
}
else {
this._updateSize(this._w, this._h);
w = this._w * scaleX;
h = this._h * scaleY;
}
let appx = (w * _mat4_temp.m00) * node._anchorPoint.x;
let appy = (h * _mat4_temp.m05) * node._anchorPoint.y;
let tx = _mat4_temp.m12 * scaleX - appx + offsetX, ty = _mat4_temp.m13 * scaleY - appy + offsetY;
let matrix = "matrix(" + a + "," + -b + "," + -c + "," + d + "," + tx + "," + -ty + ")";
this._video.style['transform'] = matrix;
this._video.style['-webkit-transform'] = matrix;
this._video.style['transform-origin'] = '0px 100% 0px';
this._video.style['-webkit-transform-origin'] = '0px 100% 0px';
}
});
VideoPlayerImpl.EventType = {
PLAYING: 0,
PAUSED: 1,
STOPPED: 2,
COMPLETED: 3,
META_LOADED: 4,
CLICKED: 5,
READY_TO_PLAY: 6
};
// video 队列,所有 vidoe 在 onEnter 的时候都会插入这个队列
VideoPlayerImpl.elements = [];
// video 在 game_hide 事件中被自动暂停的队列,用于回复的时候重新开始播放
VideoPlayerImpl.pauseElements = [];
cc.game.on(cc.game.EVENT_HIDE, function () {
let list = VideoPlayerImpl.elements;
for (let element, i = 0; i < list.length; i++) {
element = list[i];
if (element.isPlaying()) {
element.pause();
VideoPlayerImpl.pauseElements.push(element);
}
}
});
cc.game.on(cc.game.EVENT_SHOW, function () {
let list = VideoPlayerImpl.pauseElements;
let element = list.pop();
while (element) {
element.play();
element = list.pop();
}
});
/**
* Adapter various machines
* @devicePixelRatio Whether you need to consider devicePixelRatio calculated position
* @event To get the data using events
*/
VideoPlayerImpl._polyfill = {
devicePixelRatio: false,
event: "canplay",
canPlayType: []
};
/**
* Some old browser only supports Theora encode video
* But native does not support this encode,
* so it is best to provide mp4 and webm or ogv file
*/
let dom = document.createElement("video");
if (sys.platform !== sys.WECHAT_GAME) {
if (dom.canPlayType("video/ogg")) {
VideoPlayerImpl._polyfill.canPlayType.push(".ogg");
VideoPlayerImpl._polyfill.canPlayType.push(".ogv");
}
if (dom.canPlayType("video/mp4"))
VideoPlayerImpl._polyfill.canPlayType.push(".mp4");
if (dom.canPlayType("video/webm"))
VideoPlayerImpl._polyfill.canPlayType.push(".webm");
}
if (sys.browserType === sys.BrowserType.FIREFOX) {
VideoPlayerImpl._polyfill.autoplayAfterOperation = true;
}
if (
sys.OS_ANDROID === sys.os && (
sys.browserType === sys.BrowserType.SOUGOU ||
sys.browserType === sys.BrowserType.BROWSER_360
)
) {
VideoPlayerImpl._polyfill.zoomInvalid = true;
}
let style = document.createElement("style");
style.innerHTML = ".cocosVideo:-moz-full-screen{transform:matrix(1,0,0,1,0,0) !important;}" +
".cocosVideo:full-screen{transform:matrix(1,0,0,1,0,0) !important;}" +
".cocosVideo:-webkit-full-screen{transform:matrix(1,0,0,1,0,0) !important;}";
document.head.appendChild(style);
module.exports = VideoPlayerImpl;
@@ -1,24 +0,0 @@
/*
*
* Copyright 2012 Yannick Loriot.
* http://yannickloriot.com
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*/
-19
View File
@@ -1,19 +0,0 @@
Copyright (c) 2007 Scott Lembcke and Howling Moon Software
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-22
View File
@@ -1,22 +0,0 @@
Copyright (c) 2013-2014 Chukong Technologies
Copyright (c) 2010-2012 cocos2d-x community
(see each file to see the different copyright owners)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-23
View File
@@ -1,23 +0,0 @@
cocos2d-x-js http://www.cocos2d-x.org
Copyright (c) 2010-2011 - cocos2d-x community
(see each file to see the different copyright owners)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
+635 -635
View File
File diff suppressed because it is too large Load Diff