2011-05-20 26 views
0

我正在開發一個博客應用程序,並且使用Windows Live Writer 2011嵌入YouTube視頻非常簡單,但我遇到了一個奇怪的問題。下面是我做的,Windows Live Writer 2011嵌入YouTube視頻向我的網站發送黑色圖像

  1. 我複製鏈接從YouTube網站上,例如,http://www.youtube.com/watch?v=3Kk-yZ7VpeA
  2. 從WLW我插入視頻從網上粘貼在它的鏈接
  3. WLW顯示視頻,而無需任何問題
  4. 我WLW查看源代碼,它提供了以下HTML <div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:bb7a51da-b141-42e1-9e93-72967dd2f73d" class="wlWriterEditableSmartContent"><embed src="http://www.youtube.com/v/3Kk-yZ7VpeA?hd=1" type="application/x-shockwave-flash" wmode="transparent" width="448" height="252"></embed></div>

所有這些工作正常使用預覽和一切,但是當我發佈,它顯示了IMAG的黑色squaure而不是我網站上的視頻。此外,發送到服務器的html WLW如下:<div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:bb7a51da-b141-42e1-9e93-72967dd2f73d" class="wlWriterEditableSmartContent"><div id="7bd0cee8-cce8-4b10-8833-6e30cefafd64" style="margin:0px;padding:0px;display:inline;"><div><a href="http://www.youtube.com/watch?v=3Kk-yZ7VpeA" target="_new"><img src="http://127.0.0.1:10000/devstoreaccount1/ray/blog/image/2011/05/videob8758375cccf.jpg" style="border-style:none;" alt="" /></a></div></div></div>

請注意,「嵌入」標記不再存在,而是改爲創建「img」標記。我不知道爲什麼WLW發送了它發送的內容以及如何解決此問題,請有人幫忙指出。

非常感謝!

回答

0

我明白了。我添加了

<supportsEmbeds>Yes</supportsEmbeds> 

到wlwmanifest.xml文件。如果沒有這一行,WLW會將「嵌入」的博客功能顯示爲「未知」,並與嵌入標記混淆。