├── .gitignore ├── tests ├── BeBopAliens.mp3 ├── BeBopAliens.ogg ├── README.md ├── tests.html ├── runner.js ├── tests.js └── .jshintrc ├── screenshots ├── bPlayer_demo_data_0.png ├── bPlayer_demo_data_1.png └── bPlayer_demo_data_no.png ├── css └── bootstrap3_player.css ├── CHANGES.md ├── README.md ├── index.html ├── js ├── .jshintrc └── bootstrap3_player.js └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | *.sublime-workspace 2 | *.sublime-project 3 | .DS_Store 4 | *~ 5 | js/node_modules/ 6 | -------------------------------------------------------------------------------- /tests/BeBopAliens.mp3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iainhouston/bootstrap3_player/HEAD/tests/BeBopAliens.mp3 -------------------------------------------------------------------------------- /tests/BeBopAliens.ogg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iainhouston/bootstrap3_player/HEAD/tests/BeBopAliens.ogg -------------------------------------------------------------------------------- /screenshots/bPlayer_demo_data_0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iainhouston/bootstrap3_player/HEAD/screenshots/bPlayer_demo_data_0.png -------------------------------------------------------------------------------- /screenshots/bPlayer_demo_data_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iainhouston/bootstrap3_player/HEAD/screenshots/bPlayer_demo_data_1.png -------------------------------------------------------------------------------- /screenshots/bPlayer_demo_data_no.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/iainhouston/bootstrap3_player/HEAD/screenshots/bPlayer_demo_data_no.png -------------------------------------------------------------------------------- /tests/README.md: -------------------------------------------------------------------------------- 1 | Testing notes: 2 | ----------- 3 | 4 | - ~~Run tests in ECMAScript 6-compatible browser e.g. Firefox 34 or later~~ Tests run in Moz and WebKit browsers. There were significant differences seen in the behaviour of asynchronous actions. Tests refactored to avoid these differences. 5 | - [FuncUnit testing library](http://funcunit.com/index.html) is used for Functional Tests with waits for asynchrous events e.g. round trip from mute button -> audio element action -> event listener on volume slider etc. 6 | - FuncUnit adds to [QUnit](http://api.qunitjs.com/)'s more basic async support. 7 | - Not all real User interactions behave the same as FuncUnit actions. Clicking the play button, for example, doesn't have exactly the same effect in both cases. 8 | - Even so. We can build a suite of tests sufficient to satisfy ourselves that the styling changes we made did not adversely impact the Javascript functionality. 9 | - Don't test include player html in `#qunit-fixture` when running FuncUnit tests. i.e. Our test script consists of just one Functional Test with FuncUnit vs lots of atomic Unit Tests with QUnit. 10 | - The test files BeBopAliens.ogg and BeBopAliens.mp3 are my original work and available to you under [Creative Commens Licence 0](http://creativecommons.org/about/cc0) 11 | -------------------------------------------------------------------------------- /css/bootstrap3_player.css: -------------------------------------------------------------------------------- 1 | .playa input[type="range"] { 2 | background-color: #ddd; 3 | border: 1px solid #bbb; 4 | border-radius: 0.5em; 5 | opacity: 0.5; 6 | height: 1em; 7 | top: 2px; 8 | position: relative; 9 | } 10 | 11 | .playa .thumbnail { 12 | width:100%; 13 | } 14 | 15 | /* sliders and buttons need a uniform height */ 16 | .playa .btn-group .btn { 17 | display:inline-block; 18 | float:none; 19 | height: 2.2em; 20 | } 21 | 22 | /* contains the attribution link */ 23 | .playa .row:nth-child(4) { 24 | overflow: hidden; 25 | } 26 | 27 | /* Acknowledgements: 28 | To Glyphicons (http://glyphicons.com/) for the Halflings glyphs font */ 29 | 30 | /* .spin is used to rotate glyphicon glyphicon-refresh */ 31 | .spin { 32 | -webkit-animation: spin 2s infinite linear; 33 | -moz-animation: spin 2s infinite linear; 34 | -o-animation: spin 2s infinite linear; 35 | animation: spin 2s infinite linear; 36 | } 37 | 38 | @-moz-keyframes spin { 39 | from { 40 | -moz-transform: rotate(0deg); 41 | } 42 | to { 43 | -moz-transform: rotate(360deg); 44 | } 45 | } 46 | 47 | @-webkit-keyframes spin { 48 | from { 49 | -webkit-transform: rotate(0deg); 50 | } 51 | to { 52 | -webkit-transform: rotate(360deg); 53 | } 54 | } 55 | 56 | @keyframes spin { 57 | from { 58 | transform: rotate(0deg); 59 | } 60 | to { 61 | transform: rotate(360deg); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /tests/tests.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 |