0
나는 다음과 같은 iframe을 사용하여 레일 4 응용 프로그램에서 비디오를 포함하는 것을 시도하고있다 : 내 로컬 서버에서 응용 프로그램을 제공하고 지금방지 레일의 src URL의 4 변환
<iframe src ="http://www.slideshare.net/slideshow/embed_code/4482208"> </iframe>
을 (로컬 호스트 : 3000) .
응용, 그러나, 자동으로
http://localhost:3000/www.slideshare.net/slideshow/embed_code/4482208
나는이 상상에서 비디오를 찾습니다 때문에 레일 자산 파이프 라인이다?
내 로컬 서버가 아닌 slideshare.net에서 외부 위치에서 비디오를 찾으려면 앱이 필요합니다.
Backbone 프런트 엔드 내에서 jquery를 사용하여 iframe을 dom 객체로 삽입합니다. 여기 코드입니다 :
x = $(document.createElement('iframe')).attr({src: "http://www.slideshare.net/slideshow/embed_code/2686843" , frameborder: '0', marginwidth: '0', marginheight: '0', scrolling: 'no', allowfullscreen: ''})
$('body').append x
이 URL을 생성하는'link_to'를 사용하는 ? 일부 코드를 볼 수 있습니까 – CuriousMind
'link_to'를 사용하고 있지 않습니다. 간단히 dom iframe 객체를 생성하고 (백본 프론트 엔드 내에서 jquery를 사용하여) 삽입합니다. x = $ (document.createElement ('iframe')). addClass ('slideshare'). attr ({src : "http://www.slideshare.net/slideshow/embed_code/2686843", frameborder : '0 ', marginwidth :'0 ', marginheight :'0 ', 스크롤 :'no ', allowfullscreen :' '} – user1050268
코드를 보여줍니다. – CuriousMind