Visualizzazione dei risultati da 1 a 9 su 9
  1. #1
    Utente di HTML.it L'avatar di fanoste
    Registrato dal
    Oct 2005
    Messaggi
    271

    visualizza filmato da db

    ciao a tutti.
    ho quest'oggetto:
    <object data="video/filemato1.wmv" type="video/mpeg" width="278" height="263">
    <embed src="video/filmato1.wmv" type="video/mpeg" width="278" height="263"></embed>
    </object>


    e tutto funziona perfettamente.

    se però volessi visualizzare un video preso da un db (solo percorso) e aggiungo:

    <%=(video.Fields.Item("filmato").Value)%>

    ho fatto così:

    <object data="<%=(video.Fields.Item("filmato").Value)%>" type="video/mpeg" width="278" height="263">
    <embed src="<%=(video.Fields.Item("filmato").Value)%>" type="video/mpeg" width="278" height="263"></embed>
    </object>


    nell'oggetto non mi funziona ! mi da questo errore:
    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

  2. #2
    Utente di HTML.it L'avatar di wegawhite
    Registrato dal
    Aug 2004
    Messaggi
    1,400
    La connessione al DB?
    L'apertura del recordset?
    Dove stanno?

  3. #3
    Utente di HTML.it L'avatar di fanoste
    Registrato dal
    Oct 2005
    Messaggi
    271
    ci sono ci sono:


    <%
    var streaming = Server.CreateObject("ADODB.Recordset");
    streaming.ActiveConnection = MM_videostreaming_STRING;
    streaming.Source = "select * from video";
    streaming.CursorType = 0;
    streaming.CursorLocation = 2;
    streaming.LockType = 1;
    streaming.Open();
    var streaming_numRows = 0;
    %>

  4. #4
    Utente di HTML.it L'avatar di wegawhite
    Registrato dal
    Aug 2004
    Messaggi
    1,400
    codice:
    <object data="<%=(streaming.Fields.Item("filmato").Value)%>" type="video/mpeg" width="278" height="263"> 
    <embed src="<%=(streaming.Fields.Item("filmato").Value)%>" type="video/mpeg" width="278" height="263"></embed> 
    </object>

  5. #5
    Utente di HTML.it L'avatar di fanoste
    Registrato dal
    Oct 2005
    Messaggi
    271
    ora ci provo...+
    ma è uguale a quello che ho postato io?

  6. #6
    Utente di HTML.it L'avatar di fanoste
    Registrato dal
    Oct 2005
    Messaggi
    271
    ho cambiato la pagina asp e ora mi trovo con questo:

    <%
    Response.expires = 0
    Response.expiresabsolute = Now() - 1
    Response.addHeader "pragma", "no-cache"
    Response.addHeader "cache-control", "private"
    Response.CacheControl = "no-cache"
    %>
    <%
    ewCurSec = 0 ' Initialise

    ' User levels
    Const ewAllowAdd = 1
    Const ewAllowDelete = 2
    Const ewAllowEdit = 4
    Const ewAllowView = 8
    Const ewAllowList = 8
    Const ewAllowReport = 8
    Const ewAllowSearch = 8
    Const ewAllowAdmin = 16
    %>
    <%

    ' Initialize common variables
    x_idvideo = Null: ox_idvideo = Null
    x_titolo = Null: ox_titolo = Null
    x_data = Null: ox_data = Null
    x_filmato = Null: ox_filmato = Null
    fs_x_filmato = 0
    fn_x_filmato = ""
    ct_x_filmato = ""
    w_x_filmato = 0
    h_x_filmato = 0
    a_x_filmato = ""
    x_foto = Null: ox_foto = Null
    fs_x_foto = 0
    fn_x_foto = ""
    ct_x_foto = ""
    w_x_foto = 0
    h_x_foto = 0
    a_x_foto = ""
    %>


    <%
    Response.Buffer = True
    x_idvideo = Request.QueryString("idvideo")
    If x_idvideo = "" Or IsNull(x_idvideo) Then Response.Redirect "videolist.asp"

    ' Get action
    sAction = Request.Form("a_view")
    If sAction = "" Or IsNull(sAction) Then
    sAction = "I" ' Display with input box
    End If

    ' Open connection to the database
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open xDb_Conn_Str
    Select Case sAction
    Case "I": ' Get a record to display
    If Not LoadData() Then ' Load Record based on key
    Session("ewmsg") = "No records found"
    conn.Close ' Close Connection
    Set conn = Nothing
    Response.Clear
    Response.Redirect "videolist.asp"
    End If
    End Select
    %>
    </span></p>



    <form>
    <table border="0" cellspacing="1" cellpadding="4" bgcolor="#CCCCCC">
    <tr>
    <td bgcolor="#3366CC"><span class="aspmaker" style="color: #FFFFFF;">idvideo</span></td>
    <td bgcolor="#F5F5F5"><span class="aspmaker">
    <% Response.Write x_idvideo %>
    </span></td>
    </tr>
    <tr>
    <td bgcolor="#3366CC"><span class="aspmaker" style="color: #FFFFFF;">titolo</span></td>
    <td bgcolor="#F5F5F5"><span class="aspmaker">
    <% Response.Write x_titolo %>
    </span></td>
    </tr>
    <tr>
    <td bgcolor="#3366CC"><span class="aspmaker" style="color: #FFFFFF;">data</span></td>
    <td bgcolor="#F5F5F5"><span class="aspmaker">
    <% Response.Write x_data %>
    </span></td>
    </tr>
    <tr>
    <td bgcolor="#3366CC"><span class="aspmaker" style="color: #FFFFFF;">filmato</span></td>
    <td bgcolor="#F5F5F5"><span class="aspmaker">
    <% If Not IsNull(x_filmato) Then %>
    <%= x_filmato %>
    <% End If %>
    </span></td>
    </tr>
    <tr>
    <td bgcolor="#3366CC"><span class="aspmaker" style="color: #FFFFFF;">foto</span></td>
    <td bgcolor="#F5F5F5"><span class="aspmaker">
    <% If Not IsNull(x_foto) Then %>
    [img]<%= ewUploadPath(0) & x_foto %>[/img]
    <% End If %>
    </span></td>
    </tr>
    </table>
    </form>




    <%
    conn.Close ' Close Connection
    Set conn = Nothing
    %>
    <%

    '-------------------------------------------------------------------------------
    ' Function LoadData
    ' - Load Data based on Key Value
    ' - Variables setup: field variables

    Function LoadData()
    Dim sSql, rs, sWhere, sGroupBy, sHaving, sOrderBy
    sSql = "SELECT * FROM [video]"
    sWhere = ""
    sGroupBy = ""
    sHaving = ""
    sOrderBy = ""
    If sWhere <> "" Then sWhere = sWhere & " AND "
    sWhere = sWhere & "([idvideo] = " & AdjustSql(x_idvideo) & ")"
    sSql = sSql & " WHERE " & sWhere
    If sGroupBy <> "" Then
    sSql = sSql & " GROUP BY " & sGroupBy
    End If
    If sHaving <> "" Then
    sSql = sSql & " HAVING " & sHaving
    End If
    If sOrderBy <> "" Then
    sSql = sSql & " ORDER BY " & sOrderBy
    End If
    Set rs = Server.CreateObject("ADODB.Recordset")
    rs.Open sSql, conn
    If rs.Eof Then
    LoadData = False
    Else
    LoadData = True
    rs.MoveFirst

    ' Get the field contents
    x_idvideo = rs("idvideo")
    x_titolo = rs("titolo")
    x_data = rs("data")
    x_filmato = rs("filmato")
    x_foto = rs("foto")
    End If
    rs.Close
    Set rs = Nothing
    End Function
    %>

  7. #7
    Utente di HTML.it
    Registrato dal
    Jan 2006
    Messaggi
    127
    io vorrei inserire un video in una pagina (senza database) come qui: http://www.infomotori.com/a_8_IT_16408_1.html

    compare in questo modo usando il codice scritto da fanoste?

    tks!

  8. #8
    Utente di HTML.it
    Registrato dal
    Jan 2006
    Messaggi
    127
    come mai il video non si vede direttamente dentro la pagina ma si apre il media player in una nuova finestra?

  9. #9

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.