Code Monkey home page Code Monkey logo

bootstrap3_player's Introduction

NOTE: This is a fork to support dynamicly created elements, such as with jquery.

For example:

 $("<audio/>", {
            "id": data.id,
            controls: "controls",
            "data-info-album-art": "image.png",
            "data-info-id": data.info.id,
            "data-info-album-title": data.title,
            "data-info-artist": data.artist,
            "data-info-title": data.info.title,
            "data-info-label": data.label, "),
            "data-info-year": data.year,
            "data-info-att": data.attr,
            "data-info-att-link": "/",
            html: "An html5-capable browser is required to play this audio.",
        }).appendTo("#body");

        $("<source>", {
            src: 'my-mp3file.mp3',
            type: "audio/mpeg",
        }).appendTo('#' + data.id);

        // this method initializes the bootstrap3_player
        $("#" + data.id).bootAudio();

End.

bootstrap3_player

An HTML5 Audio Player Skin For Twitter Bootstrap 3

Requires:

How to use

Clone or download this repo; then open the included index.html file:

  • with your browser to:
  • with your text editor to:
    • see all the css and js files you need to link to
    • see the <audio> tags in use

Styling caveat

Works best when the player is not enclosed in too narrow a container in your page otherwise the player controls can appear jumbled. Both the seek and volume sliders are hidden on narrow (xs) viewports. A good strategy is to start "mobile-first" as usual by enclosing your audio block in a row that uses all twelve grid colums of the page's outer container in an xs viewport. Then, on wider viewports, the player can occupy fewer of the page's grid columns. See the example row widths in index.html and the corresponding live demo.

Forked from William Randol's bootstrap-player
  • bootstrap-player is great for Bootstrap 2
  • All the functionality of William Randol's player is preserved
    (QUnit / FuncUnit test suite in progress ๐ŸŒ’)
  • bootstrap3_player updates the styling of bootstrap-player; has fewer dependencies; uses Bootstrap 3

For some info on the differences between bootstrap-player and bootstrap3_player, see here.

See a live demo

  • Audio with no additional data

  • Audio with data - collapsed

  • Audio with data - expanded

bootstrap3_player's People

Contributors

dvwright avatar iainhouston avatar jaromaz avatar williamrandol avatar

Watchers

 avatar

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.