Skip to content

Commit

Permalink
fix: extra HOST
Browse files Browse the repository at this point in the history
  • Loading branch information
halwu(吴浩麟) committed May 29, 2017
1 parent a5d180d commit 91fdde6
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
3 changes: 2 additions & 1 deletion doc/live/flv.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React, { PureComponent } from 'react';
import { Reflv } from '../../src/index';
import { HOST } from './index';

export class FLV extends PureComponent {

render() {
return (
<Reflv
url="http://127.0.0.1:8081/live/movie.flv"
url={`http://${HOST}:7001/live/movie.flv`}
type="flv"
isLive
cors
Expand Down
3 changes: 2 additions & 1 deletion doc/live/hls.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import React, { PureComponent } from 'react';
import { HOST } from './index';

export class HLS extends PureComponent {

render() {
return (
<video autoPlay style={{ width: '100%' }}>
<source src="http://127.0.0.1:8082/live/movie.m3u8"/>
<source src={`http://${HOST}:7002/live/movie.m3u8`}/>
</video>
)
}
Expand Down
3 changes: 3 additions & 0 deletions doc/live/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import { RTMP } from './rtmp';
import { FlvSupport } from '../support';
import '../index.scss';

// export const HOST = 'wuhaolin.cn';
export const HOST = 'localhost';

const ROOT = (
<div className="reflv-wrap">
<h1>常见直播方案对比</h1>
Expand Down
3 changes: 2 additions & 1 deletion doc/live/rtmp.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
import React, { PureComponent } from 'react';
import swfobject from 'swfobject';
import player from './player.swf';
import { HOST } from './index';

export class RTMP extends PureComponent {

componentDidMount() {
const soFlashVars = {
src: 'rtmp://localhost/live/movie',
src: `rtmp://${HOST}:1935/live/movie`,
streamType: 'live',
autoPlay: "true",
controlBarAutoHide: "true",
Expand Down

0 comments on commit 91fdde6

Please sign in to comment.