Comments (8)
適当書いたけど、こんな感じでいいはず。
#soundcloud.coffee
#API読込み前提
@play: (sc_id, client_id, $dom, is_autoplay=true) ->
container = $dom.html("""
<div>
<label>
Volume <input type="range" min=0 max=100 value=100>
</label>
<iframe width="100%" height="400" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?visual=true&url=http%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F#{sc_id}&show_artwork=true&client_id=#{client_id}&auto_play=#{if is_autoplay then 'true' else 'false'}&t=3000"></iframe>
</div>
""")
widget = SC.Widget($('iframe', container)[0]);
$("input", container).on("change", ->
widget.setVolume($(this).val() / 100)
)
widget.getVolume((volume) ->
$("input", container).val(volume * 100)
)
container
from 245cloud.
@tkrkt さんこちら、色んな方から要望頂いていたのでめちゃくちゃ嬉しいです!
取り急ぎ下記で対応してみたのですが
#57
こんな感じでみぎがわ右側にいい感じにでました!
以上が取り急ぎの共有になります!
from 245cloud.
あ、#API読込み前提
の部分見落としてました。。。
今からやります!
from 245cloud.
@tkrkt さんAPI埋め込みって
<script src="https://w.soundcloud.com/player/api.js"></script>
を読み込むだけではダメってことですよね。
tkrkt さんRailsはお使いですか?
もーしよろしければ
Rails化は無事masterブランチに取り込みましたので
そこに対してPullRequest頂けると幸いでございます...!
from 245cloud.
API埋め込みはその一行でいいはずです。(実際はサーバにおいて使ったほうがよさそうですが)
スクリプト適当に書きすぎて間違ってたっぽいですね。
from 245cloud.
出来てるっぽいのでCloseですね。ちょいアイコンがずれてますが。うーん。
from 245cloud.
勝手にCloseしない方が良かったかも。
from 245cloud.
@tkrkt closeしてもらって大丈夫ですよ!
別チケット化する運用でいければと思いますー!
from 245cloud.
Related Issues (20)
- users#showに集中達成レポート
- テストissue
- Facebookプロフィール写真へのアクセスにトークンが必要になる HOT 5
- URLログイン機能 HOT 1
- 招待機能 HOT 1
- Facebookログイン廃止してTwitterログインにする HOT 2
- 音楽検索のところのfa-youtubeとかのFontAwesomeが表示されていない HOT 2
- railsのバージョンを5系から6.1.4に上げる HOT 3
- Userモデル以外のfacebook_idというカラムを削除
- vue.245cloud.com構築 HOT 2
- titleタグ設定する&ユーザページからtwitterへの導線はる
- https://nishikocloud-vue.herokuapp.com/ の構築
- フロントはnuxt.jsで動かして、RailsはAPIサーバにする? HOT 4
- 5分休憩チャット
- GitHub Actions試す
- 既存のRails5+AWS+MySQLの本番環境をheroku + postgresqlにする
- グループでタイミングあわせてスタートする機能
- Dockerの環境構築
- ローカルでも動くようにする
- CI通す HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from 245cloud.