Socket
Socket
Sign inDemoInstall

mdio

Package Overview
Dependencies
5
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    mdio

A markdown document player


Version published
Maintainers
1
Install size
10.6 MB
Created

Readme

Source

mdio

Build Status

A markdown document player. See example:

Installation

For webpack

$ npm install mdio

Getting Started

Markup the content

<div id='mdio'>
  # The Three Little Pigs

  ![cover](http://homepages.uni-paderborn.de/odenbach/wwwmath/pics/pigs/pig2.jpg)
  Once upon a time there was a mother pig who had three little pigs.
  The three little pigs grew so big that their mother said to them,
  ...
</div>

Setup the player

const mdio = Mdio({
  selector: '#mdio',
  utteranceLang: 'en-US'
})

Markup Instructions

Title and Cover

The title should be the 1st token with heading1. And the cover should be the 2nd token which is the image type with 'cover' alt.

# This is the title

![cover](image-url)

...

Speech under the Scene

![image-alt1](image-url-1)    
sentence 1
sentence 2
sentence 3

![image-alt2](image-url-2)
sentence 4
sentence 5

Local Action Optional Settings

Image Scene
![image-alt1](image-url-1) <!-- {...} -->
Single Speech
sentence 1 <!-- {"utteranceRate": 0.4} -->
Multiple Speech
<!-- block {"utteranceRate": 0.4} -->
![image-alt1](image-url-1)
sentence 1
sentence 2
sentence 3
<!-- endblock -->

Avaliable Options

  • selector: the CSS selector for refering the element which the player will be set to. (default: #mdio)

API

play(callback)

...

pause(callback)

...

stop(callback)

...

forward(callback)

...

backward(callback)

...

Keywords

FAQs

Last updated on 16 Apr 2017

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc