【问题标题】:Dashing dashboard and batman.js bindingDashing 仪表板和 batman.js 绑定
【发布时间】:2014-06-01 22:33:26
【问题描述】:

我正在编写一个炫酷的小部件来流式传输视频。我有一个可以使用的小部件,但是让我无法使用 batman.js 远程更改 URL。据我所知,我需要做的就是修改对象内 URL 的结尾,但我不确定我是否以正确的方式进行。

我想在其示例中使用类似于 dashing 的命令:

 curl -d '{ "auth_token": "YOUR_AUTH_TOKEN", "channel": "12345" }'\http://url:3030/widgets/twitch

 

仪表板:twitch.erb

<li data-row="1" data-col="1" data-sizex="3" data-sizey="2">
    <div data-id="twitch" data-view="twitch"></div>
</li>

 

小部件:twitch.html

<object type="application/x-shockwave-flash" height="700" width="990" id="live_embed_player_flash" data="http://www.twitch.tv/widgets/live_embed_player.swf?channel=CHANNEL"></object>

 

twitch.coffee

class Dashing.Twitch extends Dashing.Widget

 

已回答

当然,在又玩了 10 分钟后,我想通了。但对其他人来说,这是我所做的更改:

抽搐.html

<object type="application/x-shockwave-flash" height="700" width="990" id="live_embed_player_flash" data-bind-data="channel | prepend 'http://www.twitch.tv/widgets/live_embed_player.swf?channel='"></object>

【问题讨论】:

    标签: ruby-on-rails curl coffeescript dashing batman.js


    【解决方案1】:

    当然,在又玩了 10 分钟后,我想通了。但对其他人来说,这是我所做的更改:

    抽搐.html

    <object type="application/x-shockwave-flash" height="700" width="990" id="live_embed_player_flash" data-bind-data="channel | prepend 'http://www.twitch.tv/widgets/live_embed_player.swf?channel='"></object>
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-08-21
      • 1970-01-01
      • 2014-05-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-31
      • 1970-01-01
      相关资源
      最近更新 更多