C # Markdown 라이브러리를 사용하여 Markdown에 Youtube / Vimeo 비디오를 포함 할 수 있습니까?
.NET MVC4로 웹 앱을 작성 중이며 Markdown을 사용하고 싶습니다. 오픈 소스 C # Markdown 라이브러리가 몇 개 있다는 것을 알고 있지만 Markdown 텍스트 내에 YouTube 또는 Vimeo 비디오 포함을 지원하는 라이브러리를 찾지 못했습니다.
가능한지 아는 사람 있나요?
표준 마크 다운 ( iFrame이 아님! )을 사용하는 솔루션
iframe을 사용하는 것은 " 명백한 "해결책 이 아닙니다 . 특히 사용중인 Markdown 파서 (또는 게시 플랫폼)가 다른 웹 사이트의 인라인 콘텐츠를 지원하지 않는 경우 ... 대신 유효한 링크 를 포함하여 "가짜"할 수 있습니다. - 마크 다운 파일의 이미지, 다음 형식 사용 :
[](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE "Video Title")
마크 다운에 대한 설명
이 마크 다운 스 니펫이 복잡해 보이면 두 부분으로 나눕니다.

링크에 싸인 이미지
[link text](http//example.io/my-link "link title")
유효한 마크 다운 및 YouTube 썸네일을 사용한 예 :
YouTube에서 직접 썸네일 이미지를 소싱하고 실제 동영상에 연결하므로 사용자가 이미지 / 썸네일을 클릭하면 동영상으로 이동합니다.
암호:
[](https://www.youtube.com/watch?v=StTqXEQ2l-Y "Everything Is AWESOME")
또는 독자에게이미지 / 썸네일이 실제로 재생 가능한 동영상이라는 시각적 신호 를주고 싶다면YouTube에서 자신의 동영상 스크린 샷을 찍어 대신 썸네일로 사용하세요.
비디오 컨트롤과 함께 스크린 샷을 Visual Cue로 사용하는 예 :
암호:
[](https://youtu.be/StTqXEQ2l-Y?t=35s "Everything Is AWESOME")
명확한 이점
이렇게하려면 몇 가지 추가 단계 ( a ) 동영상 의 스크린 샷 을 찍고 ( b ) 이미지를 미리보기 이미지로 사용할 수 있도록 업로드해야 하지만 3 가지 분명한 이점이 있습니다 .
- The person reading your markdown (or resulting html page) has a visual cue telling them they can watch the video (video controls encourage clicking)
- You can chose a specific frame in the video to use as the thumbnail (thus making your content more engaging)
- You can link to a specific time in the video from which play will start when the linked-image is clicked. (in our case from 35 seconds)
Taking a screenshot takes a few seconds and there are keyboard shortcuts for each OS which copy the screenshot to your clipboard which means you can paste it for even faster upload.
Not Only C#
And since this is 100% Standard markdown, it works everywhere (not just for the C# parser!) ... try it on GitHub, Redit or Ghost!
Vimeo
This approach also works with Vimeo videos
Example
Code
[](https://vimeo.com/3514904 "Little red riding hood - Click to Watch!")
Notes:
- How to take screenshot: http://www.take-a-screenshot.org/ (all platforms!)
- Upload Thumbnail Image: Once you've taken your screenshot you can drag-and-drop it into imgur.com to upload and immediately use it as your thumbnail; couldn't be easier!
- YouTube thumbnail info: How do I get a YouTube video thumbnail from the YouTube API?
- 차용 / 수정 / 확장 된 마크 다운 형식 : YouTube 동영상 삽입
인라인 HTML 을 사용 하여 비디오를 임베드 할 수 있습니다 .
# this is a *markdown* document
<iframe title="YouTube video player" width="480" height="390" src="http://www.youtube.com/watch?v=TheVideoID?autoplay=1" frameborder="0" allowfullscreen></iframe>
with a **youtube** video embedded
<iframe width="560" height="315" src="https://www.youtube.com/embed/-mUJnKI3ipI" frameborder="0" allowfullscreen></iframe>
다른 미디어에 적용된 이미지 삽입 구문은 어떻습니까?

Oembed는 쉽게 삽입 할 수 있다는 점에서 흥미 롭습니다. 사용자는 iframe 코드 대신 URL을 붙여 넣기 만하면됩니다. 비디오의 경우

'Program Club' 카테고리의 다른 글
| web.config에서 "$ (ReplacableToken…)"을 완전히 제거하는 방법 (0) | 2021.01.06 |
|---|---|
| Jasmine 및 / 또는 Sinon을 사용하여 jQuery의 .ajax () 약속을 올바르게 단위 테스트하는 방법은 무엇입니까? (0) | 2021.01.06 |
| Android에서 전화 통화를 녹음하는 방법은 무엇입니까? (0) | 2021.01.06 |
| MIN 또는 MAX에 null 값을 포함하려면 어떻게해야합니까? (0) | 2021.01.06 |
| TSQL 날짜 시간 ISO 8601 (0) | 2021.01.06 |


