Giter Site home page Giter Site logo

tctube's Introduction

Version Gitter Build Status

Contents

Introduction

這是2016年暑假,我在系上實習,老師叫我們做的系統,我用去年寫的播放器加以改進。 最新版本為0.3.1。 截圖 截圖2

Browser Support

IE Chrome Firefox Opera Safari VIVALDI
IE 9+ ✔ Chrome ✔ Firefox ✔ Opera 37.0+ ✔ Safari 4.0+ ✖ Vivaldi 1+ ✔

Installation

Base Server

  • Git: Git

  • Python: Python

注意: 本專案使用的是Python3

Python Install

要勾"Add Python to PATH",把Python加到環境變數中。

  • Nginx: Nginx
  1. Clone the repository

    Use command:

    git clone https://github.com/TCCinTaiwan/TcTube

    Or:

    Download from Github

  2. Install requirement python module

    You can use pip:

    pip install pip --upgrade
    pip install -r TcTube/requirements.txt

    Or you can run setup.py :

    python setup.py install
  3. 下載nginx後,把檔案放在TcTube底下,或者修改 main.py 中nginx路徑。

最好下載最新的穩定版本(Stable version)

  1. setup/nginx-main.conf複製到主要伺服器 nginx-*/conf/ 底下,取代原本的 nginx.conf。

假如是Ubuntu要執行則是取代/etc/nginx/nginx.conf,還要修改路徑,其他系統以此類推。

  1. setup/nginx-substation.conf複製到次要伺服器 nginx-*/conf/ 底下,取代原本的 nginx.conf。

  2. 修改主要伺服器nginx.conf檔案的upstream伺服器列表(Port要正確)。

Media Server

  1. 音樂檔案要放在 file/video/
  2. 修改 database.db裡的videos和videoSources資料表,加入自己的歌
  3. 略縮圖要放在 file/image/streamshot
insert  into videos (title, artist) values ("<title>", "<artist>");
insert into videoSources (id, video_id, source) values (1, <video_id>, "<filename>");
insert into videoSources (id, video_id, source) values (2, <video_id>, "<filename2>");
...

Usage

  • run Server:
# Go into the directory
cd TcTube

# run server
python main.py

Make sure port 80, 8000, 8080 (TCP) is open.

ShortKey

  • Ctrl + : 上一首
  • Ctrl + : 下一首
  • Shift 滾輪: 播放速度
  • : 往前
  • : 往後
  • +: 增加音量
  • -: 減少音量
  • Space: 播放/暫停
  • 0: 跳到影片開頭
  • 1: 跳到影片10%位置
  • 2: 跳到影片20%位置
  • 3: 跳到影片30%位置
  • 4: 跳到影片40%位置
  • 5: 跳到影片50%位置
  • 6: 跳到影片60%位置
  • 7: 跳到影片70%位置
  • 8: 跳到影片80%位置
  • 9: 跳到影片90%位置

Todo

  1. 資料庫:
    • 部門
      • select users.id, users.account, users.password, users.name , users.affiliation, department.name as affiliation_name, users.email, users.phone, users.birthday, users.creating_time, users.login_time, users.login_ip, users.competence from users join department on users.affiliation = department.id;
  2. 控制面板延遲
  3. APP化
  4. 頁面歷史
  5. 播放清單
  6. 影片嵌入支援
  7. Seek影片預覽
  8. SSL
  9. 選項:
    • 下載檔名格式
  10. 檔案類型分析(不是以副檔名分析)
  11. Blob
  12. 時間進度Seekable
  13. SSO
  14. localization:
    • Babel
  15. 加入uwsgi
  16. 播放器重構
  17. Chrome Extensions
  18. Youtube跟Video整合:
    • 斷線時跳過
    • Youtube斷線時使用本地
  19. 修復上傳功能

Contributing

  1. Create an issue and describe your idea
  2. GitHub forks it!
  3. Create your feature branch: git checkout -b my-new-feature
  4. Commit your changes: git commit -m 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a Pull Request

Coding Style

JavaScript

  • No tabs. Four spaces.
  • No trailing whitespace.
  • Always use semicolons and don't rely on implicit insertion.
  • use lowerCamelCase for identifier names (variables and functions).
    • ✅ good
    var helloWorld = "Hello, world."; // lowerCamelCase
    var strHelloWorld = "Hello, world."; // Hungarian Notation + lowerCamelCase
    • ❌ bad
    var HelloWorld = "Hello, world."; // UpperCamelCase, Pascal
    var helloworld = "Hello, world."; // lowercase
    var HELLOWORLD = "Hello, world."; // UPPERCASE
    var Hello_World = "Hello, world."; // Capitalized_Words_With_Underscores
    var HELLO_WORLD = "Hello, world."; // UPPER_CASE_WITH_UNDERSCORES
    var hello_world = "Hello, world."; // lower_case_with_underscores
    var hello-world = "Hello, world."; // lower-case-hyphens
    var HELLO-WORLD = "Hello, world."; // UPPER-CASE-HYPHENS
    ...
  • Double quotes. Single quotes are OK only when nested within double quotes.
    • ✅ good
    var foo = "Hello, world.";
    var bar = "Hello, 'world.'";
    • ❌ bad
    var foo = 'Hello, world.';
  • Functions are followed by no space.
    • ✅ good
    function foo() {
        ...
    }
    • ❌ bad
    function foo () {
        ...
    }
  • Always put spaces around operators (= + - * /), and after commas.
    • ✅ good
    var x = y + z;
    var values = ["Apple", "Ball", "Cat"];
    • ❌ bad
    var x=y+z;
    var values=["Apple","Ball","Cat"];
  • Argument definitions are followed by no spaces.
    • ✅ good
    function foo(a, b, c) {
        ...
    }
    • ❌ bad
    function foo( a, b, c ) {
        ...
    }
  • A single space will always and should only follow semi-colons when defining object literals.
    • ✅ good
    var foo = {
        bar: 1
    };
    • ❌ bad
    var foo = {
        bar : 1
    };
    var foo = {
        bar:1
    };
  • A single space will always follow conditional statements.
    • ✅ good
    if (true) {
       ...
    }
    • ❌ bad
    if(true) {
       ...
    }
    if(true){
       ...
    }
  • General rules for complex (compound) statements:
    • Put the opening bracket at the end of the first line.
    • Use one space before the opening bracket.
    • Put the closing bracket on a new line, without leading spaces.
    • Do not end a complex statement with a semicolon.
    function formatTime(seconds) {
        minutes = Math.floor(seconds / 60);
        minutes = (minutes >= 10) ? minutes : "0" + minutes;
        seconds = Math.floor(seconds % 60);
        seconds = (seconds >= 10) ? seconds : "0" + seconds;
        return minutes + ":" + seconds;
    }

History

For detailed changelog, check Change Log.

License

License

tctube's People

Contributors

tccintaiwan avatar lindajun avatar abscorpion avatar ac90163 avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

tctube's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.