src/application_helper.rb
def render_x3d_directly options={}
    # render x3d player
    content_tag(:div) do
      options[:value].collect do |x3d_md5|
        l1 = x3d_md5[0..1]
        l2 = x3d_md5[2..3]
        content_tag(:video,
          content_tag(:source, "I'm sorry; your browser doesn't support HTML5 video in MP4 with H.264.",
             src: "https://cspace-prod-02.ist.berkeley.edu/#TENANT#_nuxeo/data/#{l1}/#{l2}/#{x3d_md5}",
             id: 'x3d_md5',
             type: 'model/x3d+xml'),
             controls: 'controls',
             style: 'width: 640px;')
      end.join.html_safe
    end
  end
# serve X3D directy via apache (apache needs to be configured to serve nuxeo repo)
serve X3D directy via apache (apache needs to be configured to serve nuxeo repo)
serve X3D directy via apache ( apache needs to be configured to serve nuxeo repo )
def render_x3d_directly options={}
    content_tag(:div) do
      options[:value].collect do |x3d_md5|
        l1 = x3d_md5[0..1]
        l2 = x3d_md5[2..3]
        content_tag(:video,
          content_tag(:source, "I'm sorry; your browser doesn't support HTML5 video in MP4 with H.264.",
             src: "https://cspace-prod-02.ist.berkeley.edu/#TENANT#_nuxeo/data/#{l1}/#{l2}/#{x3d_md5}",
             id: 'x3d_md5',
             type: 'model/x3d+xml'),
             controls: 'controls',
             style: 'width: 640px;')
      end.join.html_safe
    end
  end
def render_x3d_directly options = { } content_tag ( :div ) do options [ :value ] . collect do | x3d_md5 | l1 = x3d_md5 [ 0 .. 1 ] l2 = x3d_md5 [ 2 .. 3 ] content_tag ( :video , content_tag ( :source , "I'm sorry; your browser doesn't support HTML5 video in MP4 with H.264." , src : "https://cspace-prod-02.ist.berkeley.edu/#TENANT#_nuxeo/data/#{l1}/#{l2}/#{x3d_md5}" , id : 'x3d_md5' , type : 'model/x3d+xml' ) , controls : 'controls' , style : 'width: 640px;' ) end . join . html_safe end end
serve X3D directy via apache (apache needs to be configured to serve nuxeo repo)
serve X3D directy via apache ( apache needs to be configured to serve nuxeo repo )
# render x3d player
options