Skip to content

Commit

Permalink
add Gruntfile.js
Browse files Browse the repository at this point in the history
  • Loading branch information
jackzhang1204 committed Jun 30, 2014
1 parent c93afe4 commit 2772410
Show file tree
Hide file tree
Showing 8 changed files with 143 additions and 42 deletions.
File renamed without changes.
90 changes: 90 additions & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
module.exports = function(grunt) {
var comments = '/*\n' +
' * Name: SewisePlayer framework 2.4.1\n' +
' * Author: Jack Zhang\n' +
' * Website: http://player.sewise.com\n' +
' * Date: June 20, 2014\n' +
' * Copyright: 2013-2014, Sewise\n' +
' * Mail: [email protected]\n' +
' * \n */\n\n';

var srcFiles = [
'src/com/sewise/base/core/Base.js',
'src/com/sewise/interfaces/player/IVodPlayer.js',
'src/com/sewise/interfaces/skin/IVodSkin.js',
'src/com/sewise/interfaces/player/ILivePlayer.js',
'src/com/sewise/interfaces/skin/ILiveSkin.js',
'src/com/sewise/base/globals/GlobalConst.js',
'src/com/sewise/base/events/CommandDispatcher.js',
'src/com/sewise/base/events/Events.js',
'src/com/sewise/base/utils/Utils.js',
'src/com/sewise/base/params/GlobalParams.js',
'src/com/sewise/base/params/H5Params.js',
'src/com/sewise/base/medias/PlayerSkinLoader.js',
'src/com/sewise/base/medias/vod/VodVideo.js',
'src/com/sewise/base/medias/vod/VodAudio.js',
'src/com/sewise/base/medias/vod/VodMediaConsole.js',
'src/com/sewise/base/medias/vod/VodMediaStreams.js',
'src/com/sewise/base/medias/live/LiveVideo.js',
'src/com/sewise/base/medias/live/LiveMediaConsole.js',
'src/com/sewise/base/medias/live/LiveMediaStreams.js',
'src/com/sewise/base/medias/PlayerCommon.js',
'src/com/sewise/base/external/FlashExternalInterface.js',
'src/com/sewise/base/external/Html5ExternalInterface.js',
'src/com/sewise/base/dom/ContextMenu.js',
'src/com/sewise/base/SewisePlayer.js'
];

grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
banner: comments,
stripBanners: true,
separator: '\n\n'
},
dist: {
src: srcFiles,
dest: 'bin/<%= pkg.name %>.js'
}
},
uglify: {
options: {
banner: comments,
compress: {
drop_console: true
}
},
my_target: {
files: {
'bin/<%= pkg.name %>.min.js': srcFiles
}
}
},
jshint: {
files: ['gruntfile.js', srcFiles],
options: {
globals: {
jQuery: true,
console: true,
module: true
}
}
},
watch: {
files: ['<%= jshint.files %>'],
tasks: ['jshint']
}


});

grunt.loadNpmTasks('grunt-contrib-concat');
grunt.loadNpmTasks('grunt-contrib-uglify');
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-contrib-watch');

grunt.registerTask('test', ['jshint']);
grunt.registerTask('default', ['uglify', 'concat', 'jshint']);

};
6 changes: 4 additions & 2 deletions MIT-LICENSE.txt → LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Copyright (c) 2011 - 2014 Sewise Ltd
The MIT License (MIT)

Copyright (c) 2011-2014 Sewise, Inc
http://www.sewise.com/

Permission is hereby granted, free of charge, to any person obtaining a copy
Expand All @@ -17,4 +19,4 @@ 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.
THE SOFTWARE.
2 changes: 1 addition & 1 deletion demos/flash_fallback_html5.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
videourl: "http://219.232.161.202:5080/flvseek/data/userdata/vod/resource/201402/OVNNwRk1.flv",
poster: "http://www.sewise.com/data/attachment/portal/201402/10/120117q992dwsgns5cxzoz.png",
skin: "vodFlowPlayer",
claritybutton: "false",
claritybutton: "disable",
title: "flash fallback html5 兼容地址播放",
fallbackurls:{
mp4: "http://www.w3schools.com/html/mov_bbb.mp4",
Expand Down
74 changes: 39 additions & 35 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,41 +1,45 @@
{
"name": "Sewise Player",
"version": "1.0.0",
"name": "sewise.player",
"description": "The HTML5 Video Player Framework",
"homepage": "http://player.sewise.com/",
"version": "2.4.1",
"keywords": [
"html5",
"skins",
"video",
"player",
"web player",
"vod player",
"live player",
"html5 player",
"flash player",
"sewise player",
"html5 css skins",
"free html5 player",
"javascript player",
"stream media player",
"opensource html5 player"
"html5",
"skins",
"video",
"player",
"web player",
"vod player",
"live player",
"html5 player",
"flash player",
"sewise player",
"html5 css skins",
"free html5 player",
"javascript player",
"stream media player",
"opensource html5 player"
],
"dependencies": {
"jquery": ">1.6.0",
"sewise server": ">1.0.0"
"homepage": "http://player.sewise.com/",
"author": "Sewise, Inc.",
"repository": {
"type": "git",
"url": "https://github.com/jackzhang1204/sewise-player.git"
},
"licenses": [
{
"type": "MIT",
"url": "http://www.opensource.org/licenses/MIT"
}
],
"repositories": [
{
"type": "git",
"url": "https://github.com/jackzhang1204/sewise-player.git"
}
],
"github": "https://github.com/jackzhang1204/sewise-player",
"main": "player/sewise.player.min.js"
"bugs": {
"url": "https://github.com/jackzhang1204/sewise-player/issues"
},
"license": {
"type": "MIT",
"url": "https://github.com/jackzhang1204/sewise-player/blob/master/LICENSE"
},
"devDependencies": {
"grunt": "~0.4.5",
"grunt-contrib-concat": "~0.4.0",
"grunt-contrib-uglify": "~0.5.0",
"grunt-contrib-jshint": "~0.10.0",
"grunt-contrib-watch": "~0.6.1"
},
"engines": {
"node": "~0.10.1"
}
}
4 changes: 3 additions & 1 deletion player/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
</head>
<body>
<div style="width: 640px; height: 352px; ">
<script type="text/javascript" src="../player/sewise.player.min.js?server=vod&type=mp4&videourl=http://www.w3schools.com/html/mov_bbb.mp4&sourceid=&autostart=true&starttime=0&lang=en_US&logo=http://onvod.sewise.com/libs/swfplayer/skin/images/logo.png&title=VodVideo&buffer=5&skin=vodFlowPlayer&fallbackurls=%7B%0A%09%22ogg%22%3A%20%22http%3A%2F%2Fwww.w3schools.com%2Fhtml%2Fmov_bbb.ogg%22%2C%0A%09%22webm%22%3A%20%22http%3A%2F%2Fwww.w3schools.com%2Fhtml%2Fmov_bbb.webm%22%0A%7D&topbardisplay=disable"></script>
<script type="text/javascript" src="../player/sewise.player.min.js?server=vod&type=mp4&videourl=http://www.w3schools.com/html/mov_bbb.mp4&sourceid=&autostart=true&starttime=0&lang=en_US&logo=http://onvod.sewise.com/libs/swfplayer/skin/images/logo.png&title=VodVideo&buffer=5&claritybutton=disable&skin=vodFlowPlayer&fallbackurls=%7B%0A%09%22ogg%22%3A%20%22http%3A%2F%2Fwww.w3schools.com%2Fhtml%2Fmov_bbb.ogg%22%2C%0A%09%22webm%22%3A%20%22http%3A%2F%2Fwww.w3schools.com%2Fhtml%2Fmov_bbb.webm%22%0A%7D&topbardisplay=disable"></script>
</div>
<div style="padding: 10px 10px;">注:如果当前浏览器不支持HTML5,将自动启用FLASH播放。</div>
<div style="padding: 0px 10px;"><a href="https://github.com/jackzhang1204/sewise-player" target="_blank">Fock it on GitHub</a></div>
</body>
</html>
5 changes: 3 additions & 2 deletions player/live.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
<div style="width: 640px; height: 360px; ">
<script type="text/javascript" src="http://219.232.161.204/libs/swfplayer/player/sewise.player.min.js?server=live&autostart=true&pid=vk5nx2cj&shifttime=&buffer=5&lang=en_US&logo=http://onvod.sewise.com/libs/swfplayer/skin/images/logo.png&claritybutton=disable&skin=liveWhite"></script>
</div>
<div style="padding: 10px;"><a href="javascript:SewisePlayer.doSeek('20140620103050');">Play Shift Time | 时移播放</a></div>
<div style="padding: 10px;">注:如果当前设备为Mobile平台,播放器将自动启用HTML5播放模块播放m3u8文件。</div>
<div style="padding: 10px 10px;"><a href="javascript:SewisePlayer.doSeek('20140624103050');">Play Shift Time | 时移播放</a></div>
<div style="padding: 10px 10px;">注:如果当前设备为Mobile平台,播放器将自动启用HTML5播放m3u8文件。</div>
<div style="padding: 0px 10px;"><a href="https://github.com/jackzhang1204/sewise-player" target="_blank">Fock it on GitHub</a></div>
</body>
</html>
4 changes: 3 additions & 1 deletion player/vod.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@
</head>
<body>
<div style="width: 640px; height: 352px; ">
<script type="text/javascript" src="../player/sewise.player.min.js?server=vod&type=mp4&videourl=http://www.w3schools.com/html/mov_bbb.mp4&sourceid=&autostart=true&starttime=0&lang=en_US&logo=http://onvod.sewise.com/libs/swfplayer/skin/images/logo.png&title=VodVideo&buffer=5&skin=vodWhite&fallbackurls=%7B%0A%09%22ogg%22%3A%20%22http%3A%2F%2Fwww.w3schools.com%2Fhtml%2Fmov_bbb.ogg%22%2C%0A%09%22webm%22%3A%20%22http%3A%2F%2Fwww.w3schools.com%2Fhtml%2Fmov_bbb.webm%22%0A%7D&topbardisplay=disable"></script>
<script type="text/javascript" src="../player/sewise.player.min.js?server=vod&type=mp4&videourl=http://www.w3schools.com/html/mov_bbb.mp4&sourceid=&autostart=true&starttime=0&lang=en_US&logo=http://onvod.sewise.com/libs/swfplayer/skin/images/logo.png&title=VodVideo&buffer=5&skin=vodWhite&fallbackurls=%7B%0A%09%22ogg%22%3A%20%22http%3A%2F%2Fwww.w3schools.com%2Fhtml%2Fmov_bbb.ogg%22%2C%0A%09%22webm%22%3A%20%22http%3A%2F%2Fwww.w3schools.com%2Fhtml%2Fmov_bbb.webm%22%0A%7D&topbardisplay=disable&claritybutton=disable"></script>
</div>
<div style="padding: 10px 10px;">注:如果当前浏览器不支持HTML5,将自动启用FLASH播放。</div>
<div style="padding: 0px 10px;"><a href="https://github.com/jackzhang1204/sewise-player" target="_blank">Fock it on GitHub</a></div>
</body>
</html>

0 comments on commit 2772410

Please sign in to comment.